mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
NImageCached: restored to its original glory. Warnings are expected and are acceptable.
This commit is contained in:
@@ -31,9 +31,9 @@ Image {
|
||||
}
|
||||
onCachePathChanged: {
|
||||
if (imageHash && cachePath) {
|
||||
// Check if cache file exists before trying to load it
|
||||
cacheChecker.command = ["test", "-f", cachePath]
|
||||
cacheChecker.running = true
|
||||
// Try to load the cached version, failure will be detected below in onStatusChanged
|
||||
// Failure is expected and warnings are ok in the console. Don't try to improve without consulting.
|
||||
source = cachePath
|
||||
}
|
||||
}
|
||||
onStatusChanged: {
|
||||
@@ -49,19 +49,4 @@ Image {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Check if cache file exists to avoid warnings
|
||||
Process {
|
||||
id: cacheChecker
|
||||
running: false
|
||||
onExited: function (exitCode) {
|
||||
if (exitCode === 0 && root.cachePath) {
|
||||
// Cache file exists, load it
|
||||
root.source = root.cachePath
|
||||
} else if (root.imagePath) {
|
||||
// Cache doesn't exist, load original directly
|
||||
root.source = root.imagePath
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user