2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

pausing gifs that are not currently displayed

This commit is contained in:
John Preston
2015-12-16 17:39:26 +03:00
parent 322eef660e
commit fdb93f700d
4 changed files with 75 additions and 18 deletions

View File

@@ -2441,7 +2441,7 @@ namespace App {
}
void stopGifItems() {
while (!::gifItems.isEmpty()) {
if (!::gifItems.isEmpty()) {
if (HistoryItem *playing = ::gifItems.begin().value()) {
if (playing->getMedia() && playing->getMedia()->type() == MediaTypeGif) {
static_cast<HistoryGif*>(playing->getMedia())->stop(playing);