NImageCached, less logging and better naming
This commit is contained in:
parent
3714862281
commit
4d0c2d0bc6
1 changed files with 3 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import qs.Commons
|
import qs.Commons
|
||||||
import "../Helpers/sha256.js" as Crypto
|
import "../Helpers/sha256.js" as Checksum
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -21,8 +21,8 @@ Image {
|
||||||
smooth: true
|
smooth: true
|
||||||
onImagePathChanged: {
|
onImagePathChanged: {
|
||||||
if (imagePath) {
|
if (imagePath) {
|
||||||
imageHash = Crypto.sha256(imagePath)
|
imageHash = Checksum.sha256(imagePath)
|
||||||
Logger.log("NImageCached", imagePath, imageHash)
|
// Logger.log("NImageCached", imagePath, imageHash)
|
||||||
} else {
|
} else {
|
||||||
source = ""
|
source = ""
|
||||||
imageHash = ""
|
imageHash = ""
|
||||||
|
|
@ -32,7 +32,6 @@ Image {
|
||||||
if (imageHash && cachePath) {
|
if (imageHash && cachePath) {
|
||||||
// Try to load the cached version, failure will be detected below in onStatusChanged
|
// Try to load the cached version, failure will be detected below in onStatusChanged
|
||||||
source = cachePath
|
source = cachePath
|
||||||
//Logger.Log(imagePath, cachePath)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue