From bf9ced1acdeff3b2b860fe50ce73ed6993c5d7f8 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 4 Nov 2019 10:53:13 -0400 Subject: [PATCH] Don't cache local GIFs in memory --- src/qml/Base/HImage.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qml/Base/HImage.qml b/src/qml/Base/HImage.qml index e4ecb8f9..bc89b79b 100644 --- a/src/qml/Base/HImage.qml +++ b/src/qml/Base/HImage.qml @@ -32,7 +32,9 @@ Image { horizontalAlignment: image.horizontalAlignment verticalAlignment: image.verticalAlignment - cache: true // Needed to allow GIFs to loop + // Online GIFs won't be able to loop if cache is set to false, + // but caching GIFs is expansive. + cache: ! Qt.resolvedUrl(source).startsWith("file://") paused: ! visible || window.hidden || userPaused property bool userPaused: ! window.settings.media.autoPlayGIF