NImageCached, less logging and better naming

This commit is contained in:
quadbyte 2025-08-19 17:31:30 -04:00
parent 3714862281
commit 4d0c2d0bc6

View file

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