2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Open video from ?t= links.

This commit is contained in:
John Preston
2025-01-28 11:49:45 +04:00
parent 1e77a3df20
commit 2077f51084
14 changed files with 86 additions and 74 deletions

View File

@@ -3469,6 +3469,7 @@ not_null<WebPageData*> Session::processWebpage(
0,
QString(),
false,
false,
data.vdate().v
? data.vdate().v
: (base::unixtime::now() + kDefaultPendingTimeout));
@@ -3496,6 +3497,7 @@ not_null<WebPageData*> Session::webpage(
0,
QString(),
false,
false,
TimeId(0));
}
@@ -3516,6 +3518,7 @@ not_null<WebPageData*> Session::webpage(
int duration,
const QString &author,
bool hasLargeMedia,
bool photoIsVideoCover,
TimeId pendingTill) {
const auto result = webpage(id);
webpageApplyFields(
@@ -3536,6 +3539,7 @@ not_null<WebPageData*> Session::webpage(
duration,
author,
hasLargeMedia,
photoIsVideoCover,
pendingTill);
return result;
}
@@ -3723,6 +3727,7 @@ void Session::webpageApplyFields(
data.vduration().value_or_empty(),
qs(data.vauthor().value_or_empty()),
data.is_has_large_media(),
false, // photo_is_video_cover
pendingTill);
}
@@ -3744,6 +3749,7 @@ void Session::webpageApplyFields(
int duration,
const QString &author,
bool hasLargeMedia,
bool photoIsVideoCover,
TimeId pendingTill) {
const auto requestPending = (!page->pendingTill && pendingTill > 0);
const auto changed = page->applyChanges(
@@ -3763,6 +3769,7 @@ void Session::webpageApplyFields(
duration,
author,
hasLargeMedia,
photoIsVideoCover,
pendingTill);
if (requestPending) {
_session->api().requestWebPageDelayed(page);