mirror of https://github.com/procxx/kepka.git
Pause animated stickers as GIFs.
This commit is contained in:
parent
3577e71782
commit
3556fbf702
Telegram/SourceFiles/history/media
|
@ -16,6 +16,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "history/view/history_view_cursor_state.h"
|
||||
#include "ui/image/image.h"
|
||||
#include "ui/emoji_config.h"
|
||||
#include "mainwindow.h" // App::wnd()->controller()
|
||||
#include "window/window_controller.h" // isGifPausedAtLeastFor(..)
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_document.h"
|
||||
#include "lottie/lottie_animation.h"
|
||||
|
@ -189,7 +191,10 @@ void HistorySticker::draw(Painter &p, const QRect &r, TextSelection selection, c
|
|||
if (selected) {
|
||||
request.colored = st::msgStickerOverlay->c;
|
||||
}
|
||||
_lottie->markFrameShown();
|
||||
const auto paused = App::wnd()->controller()->isGifPausedAtLeastFor(Window::GifPauseReason::Any);
|
||||
if (!paused) {
|
||||
_lottie->markFrameShown();
|
||||
}
|
||||
p.drawImage(
|
||||
QRect(usex + (usew - _pixw) / 2, (minHeight() - _pixh) / 2, _pixw, _pixh),
|
||||
_lottie->frame(request));
|
||||
|
|
Loading…
Reference in New Issue