1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-25 10:25:17 +00:00

Make components less chatty in logs

This commit is contained in:
Chris Josten 2021-01-17 17:34:17 +01:00
parent 79d378c9ed
commit 5bdc8ee83d
2 changed files with 3 additions and 11 deletions

View file

@ -57,7 +57,7 @@ SilicaItem {
asynchronous: true
fillMode: root.fillMode
opacity: 1
source: alreadyLoaded || [PageStatus.Active, PageStatus.Deactivating].indexOf(__parentPage.status) >= 0 ? root.source : ""
source: alreadyLoaded || __parentPage && [PageStatus.Active, PageStatus.Deactivating].indexOf(__parentPage.status) >= 0 ? root.source : ""
onStatusChanged: {
if (status == Image.Ready) {
alreadyLoaded = true
@ -81,7 +81,7 @@ SilicaItem {
fillMode: root.fillMode
sourceSize.height: 32
sourceSize.width: 32 * aspectRatio
source: "image://blurhash/" + encodeURIComponent(blurhash)
source: blurhash.length > 0 ? "image://blurhash/" + encodeURIComponent(blurhash) : ""
opacity: 0
}
@ -104,12 +104,6 @@ SilicaItem {
source: fallbackImage ? fallbackImage : "image://theme/icon-m-question"
}
Text {
id: name
text: state
color: Qt.red
}
onStateChanged: console.log("New state: " + state + ", blurhash: '" + blurhash + "'")
states: [
State {
name: "fallback"
@ -150,7 +144,6 @@ SilicaItem {
while (item != null) {
if ("__silica_page" in item) {
__parentPage = item
console.log("Found parent " + item)
break;
}
item = item.parent

View file

@ -125,12 +125,11 @@ Page {
id: userItemModel
apiClient: ApiClient
parentId: model.id
limit: 12
limit: 16
}
Connections {
target: mediaLibraryModel
onStatusChanged: {
console.log("MediaLibraryModel status " + status)
if (status == ApiModel.Ready) {
userItemModel.reload()
}