Copertine: validazione contenuto prima del caching (niente più HTML in cache), id fisso per il dettaglio, handler con sintassi moderna

This commit is contained in:
2026-08-12 13:42:44 +02:00
parent f43521cc67
commit 9d8bd03990
3 changed files with 26 additions and 7 deletions
+4 -3
View File
@@ -172,13 +172,14 @@ Page {
Component.onCompleted: {
if (bookData.coverUrl && bookData.coverUrl.length > 0)
apiClient.fetchImage(bookData.coverUrl, "detail:" + bookData.id)
apiClient.fetchImage(bookData.coverUrl, "detailcover")
}
Connections {
target: apiClient
onImageReady: {
if (id === "detail:" + bookData.id)
// nota: parametro rinominato (imageId) — "id" è parola chiave QML e rompe il confronto
onImageReady: function(imageId, localPath) {
if (imageId === "detailcover")
page.coverSource = localPath
}
}