Image viewer open: pause timeline URL preview GIF
This commit is contained in:
		| @@ -18,6 +18,7 @@ Image { | ||||
|     property alias showProgressBar: progressBarLoader.active | ||||
|     property bool showPauseButton: true | ||||
|     property bool pause: ! window.settings.media.autoPlayGIF | ||||
|     property bool forcePause: false | ||||
|     property real speed: 1 | ||||
|  | ||||
|     readonly property int circleRadius: | ||||
| @@ -67,8 +68,9 @@ Image { | ||||
|             // 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 || image.pause | ||||
|             speed: image.speed | ||||
|             paused: | ||||
|                 ! visible || window.hidden || image.pause || image.forcePause | ||||
|  | ||||
|             layer.enabled: image.radius !== 0 | ||||
|             layer.effect: OpacityMask { maskSource: roundMask } | ||||
|   | ||||
| @@ -65,6 +65,7 @@ HMxcImage { | ||||
|     clientUserId: chat.userId | ||||
|     title: thumbnail ? loader.thumbnailTitle : loader.title | ||||
|     animated: eventList.isAnimated(loader.singleMediaInfo, loader.mediaUrl) | ||||
|     forcePause: Object.keys(window.visiblePopups).length > 0 | ||||
|     thumbnail: ! animated && loader.thumbnailMxc | ||||
|     mxc: thumbnail ? | ||||
|          (loader.thumbnailMxc || loader.mediaUrl) : | ||||
| @@ -75,14 +76,10 @@ HMxcImage { | ||||
|         loader.singleMediaInfo.media_crypt_dict | ||||
|     ) | ||||
|  | ||||
|  | ||||
|     onCachedPathChanged: | ||||
|         eventList.thumbnailCachedPaths[loader.singleMediaInfo.id] = cachedPath | ||||
|  | ||||
|     Binding on pause { | ||||
|         value: true | ||||
|         when: Object.keys(window.visiblePopups).length > 0 | ||||
|     } | ||||
|  | ||||
|     TapHandler { | ||||
|         acceptedButtons: Qt.LeftButton | ||||
|         acceptedModifiers: Qt.NoModifier | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	