mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Pause other GIFs when playing round video message.
This commit is contained in:
parent
5480a63beb
commit
1b7777e3a0
2 changed files with 6 additions and 1 deletions
|
@ -2087,6 +2087,7 @@ bool HistoryGif::playInline(bool autoplay) {
|
||||||
if (App::main()) {
|
if (App::main()) {
|
||||||
App::main()->mediaMarkRead(_data);
|
App::main()->mediaMarkRead(_data);
|
||||||
}
|
}
|
||||||
|
App::wnd()->controller()->enableGifPauseReason(Window::GifPauseReason::RoundPlaying);
|
||||||
}
|
}
|
||||||
if (_gif && autoplay) {
|
if (_gif && autoplay) {
|
||||||
_gif->setAutoplay();
|
_gif->setAutoplay();
|
||||||
|
@ -2096,6 +2097,9 @@ bool HistoryGif::playInline(bool autoplay) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryGif::stopInline() {
|
void HistoryGif::stopInline() {
|
||||||
|
if (_gif && _gif->mode() == Media::Clip::Reader::Mode::Video) {
|
||||||
|
App::wnd()->controller()->disableGifPauseReason(Window::GifPauseReason::RoundPlaying);
|
||||||
|
}
|
||||||
clearClipReader();
|
clearClipReader();
|
||||||
|
|
||||||
_parent->setPendingInitDimensions();
|
_parent->setPendingInitDimensions();
|
||||||
|
|
|
@ -27,7 +27,8 @@ enum class GifPauseReason {
|
||||||
InlineResults = (1 << 0),
|
InlineResults = (1 << 0),
|
||||||
SavedGifs = (1 << 1),
|
SavedGifs = (1 << 1),
|
||||||
Layer = (1 << 2),
|
Layer = (1 << 2),
|
||||||
MediaPreview = (1 << 3),
|
RoundPlaying = (1 << 3),
|
||||||
|
MediaPreview = (1 << 4),
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(GifPauseReasons, GifPauseReason);
|
Q_DECLARE_FLAGS(GifPauseReasons, GifPauseReason);
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS(GifPauseReasons);
|
Q_DECLARE_OPERATORS_FOR_FLAGS(GifPauseReasons);
|
||||||
|
|
Loading…
Add table
Reference in a new issue