mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-25 08:44:38 +00:00
Pause other GIFs when playing round video message.
This commit is contained in:
parent
5480a63beb
commit
1b7777e3a0
@ -2087,6 +2087,7 @@ bool HistoryGif::playInline(bool autoplay) {
|
||||
if (App::main()) {
|
||||
App::main()->mediaMarkRead(_data);
|
||||
}
|
||||
App::wnd()->controller()->enableGifPauseReason(Window::GifPauseReason::RoundPlaying);
|
||||
}
|
||||
if (_gif && autoplay) {
|
||||
_gif->setAutoplay();
|
||||
@ -2096,6 +2097,9 @@ bool HistoryGif::playInline(bool autoplay) {
|
||||
}
|
||||
|
||||
void HistoryGif::stopInline() {
|
||||
if (_gif && _gif->mode() == Media::Clip::Reader::Mode::Video) {
|
||||
App::wnd()->controller()->disableGifPauseReason(Window::GifPauseReason::RoundPlaying);
|
||||
}
|
||||
clearClipReader();
|
||||
|
||||
_parent->setPendingInitDimensions();
|
||||
|
@ -27,7 +27,8 @@ enum class GifPauseReason {
|
||||
InlineResults = (1 << 0),
|
||||
SavedGifs = (1 << 1),
|
||||
Layer = (1 << 2),
|
||||
MediaPreview = (1 << 3),
|
||||
RoundPlaying = (1 << 3),
|
||||
MediaPreview = (1 << 4),
|
||||
};
|
||||
Q_DECLARE_FLAGS(GifPauseReasons, GifPauseReason);
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(GifPauseReasons);
|
||||
|
Loading…
Reference in New Issue
Block a user