mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Pause other GIFs when playing round video message.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user