2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Implement preview top and bottom.

This commit is contained in:
John Preston
2024-05-04 11:37:07 +04:00
parent de73d8766c
commit a60783eae3
6 changed files with 289 additions and 43 deletions

View File

@@ -231,12 +231,17 @@ TopicIconButton::TopicIconButton(
QWidget *parent,
not_null<Window::SessionController*> controller,
not_null<Data::ForumTopic*> topic)
: TopicIconButton(parent, topic, [=] {
return controller->isGifPausedAtLeastFor(Window::GifPauseReason::Layer);
}) {
}
TopicIconButton::TopicIconButton(
QWidget *parent,
not_null<Data::ForumTopic*> topic,
Fn<bool()> paused)
: AbstractButton(parent)
, _view(
topic,
[=] { return controller->isGifPausedAtLeastFor(
Window::GifPauseReason::Layer); },
[=] { update(); }) {
, _view(topic, paused, [=] { update(); }) {
resize(st::infoTopicCover.photo.size);
paintRequest(
) | rpl::start_with_next([=] {