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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user