Don't cache local GIFs in memory

This commit is contained in:
miruka 2019-11-04 10:53:13 -04:00
parent de8d0b5823
commit bf9ced1acd

View File

@ -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