mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
fix(Notifications): update flexible image caching in DankCircularImage
- Fixes #2480
This commit is contained in:
@@ -113,6 +113,7 @@ Rectangle {
|
||||
|
||||
DankCircularImage {
|
||||
id: iconContainer
|
||||
cacheImages: false
|
||||
readonly property string rawImage: historyItem.image || ""
|
||||
readonly property string iconFromImage: {
|
||||
if (rawImage.startsWith("image://icon/"))
|
||||
|
||||
@@ -268,6 +268,7 @@ Rectangle {
|
||||
|
||||
DankCircularImage {
|
||||
id: iconContainer
|
||||
cacheImages: false
|
||||
readonly property string rawImage: notificationGroup?.latestNotification?.image || ""
|
||||
readonly property string iconFromImage: {
|
||||
if (rawImage.startsWith("image://icon/"))
|
||||
@@ -610,6 +611,7 @@ Rectangle {
|
||||
|
||||
DankCircularImage {
|
||||
id: messageIcon
|
||||
cacheImages: false
|
||||
|
||||
readonly property string rawImage: modelData?.image || ""
|
||||
readonly property string iconFromImage: {
|
||||
|
||||
@@ -818,6 +818,7 @@ PanelWindow {
|
||||
|
||||
DankCircularImage {
|
||||
id: iconContainer
|
||||
cacheImages: false
|
||||
|
||||
readonly property string rawImage: notificationData?.image || ""
|
||||
readonly property string iconFromImage: {
|
||||
|
||||
@@ -10,6 +10,7 @@ Rectangle {
|
||||
property string imageSource: ""
|
||||
property string fallbackIcon: "notifications"
|
||||
property string fallbackText: ""
|
||||
property bool cacheImages: true
|
||||
property bool hasImage: imageSource !== ""
|
||||
readonly property bool shouldProbe: imageSource !== "" && !imageSource.startsWith("image://")
|
||||
// Probe with AnimatedImage first; once loaded, check frameCount to decide.
|
||||
@@ -65,7 +66,7 @@ Rectangle {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
smooth: true
|
||||
mipmap: true
|
||||
cache: true
|
||||
cache: root.cacheImages
|
||||
visible: false
|
||||
source: root.shouldProbe ? root.imageSource : ""
|
||||
}
|
||||
@@ -79,7 +80,7 @@ Rectangle {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
smooth: true
|
||||
mipmap: true
|
||||
cache: true
|
||||
cache: root.cacheImages
|
||||
visible: false
|
||||
sourceSize.width: Math.max(width * 2, 128)
|
||||
sourceSize.height: Math.max(height * 2, 128)
|
||||
|
||||
Reference in New Issue
Block a user