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

Fix inline GIFs play start in separate windows.

Fixes #25694.
This commit is contained in:
John Preston
2023-01-18 14:57:07 +04:00
parent b3667d69a1
commit 2c75fe033c
9 changed files with 16 additions and 53 deletions

View File

@@ -1695,29 +1695,12 @@ void Session::requestItemTextRefresh(not_null<HistoryItem*> item) {
}
}
void Session::requestAnimationPlayInline(not_null<HistoryItem*> item) {
_animationPlayInlineRequest.fire_copy(item);
if (const auto media = item->media()) {
if (const auto data = media->document()) {
if (data && data->isVideoMessage()) {
const auto msgId = item->fullId();
::Media::Player::instance()->playPause({ data, msgId });
}
}
}
}
void Session::requestUnreadReactionsAnimation(not_null<HistoryItem*> item) {
enumerateItemViews(item, [&](not_null<ViewElement*> view) {
view->animateUnreadReactions();
});
}
rpl::producer<not_null<HistoryItem*>> Session::animationPlayInlineRequest() const {
return _animationPlayInlineRequest.events();
}
rpl::producer<not_null<const HistoryItem*>> Session::itemRemoved() const {
return _itemRemoved.events();
}