Skip to content

Commit

Permalink
fix(qml): properly show "no results" when there is no results
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Apr 26, 2024
1 parent f2c6940 commit 42fe094
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui-qml/src/components/GalleryScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Page {

Label {
text: galleryLoader.status == TagSearchLoader.Ready
? (results
? (results.length > 0
? qsTr("Page %1 of %2\n(%3 of %4)").arg(page).arg(galleryLoader.pageCount).arg(results.length).arg(galleryLoader.imageCount)
: qsTr("No result"))
: ''
Expand Down
2 changes: 1 addition & 1 deletion src/gui-qml/src/components/SearchScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Page {

Label {
text: pageLoader.status == TagSearchLoader.Ready
? (results
? (results.length > 0
? qsTr("Page %1 of %2\n(%3 of %4)").arg(page).arg(pageLoader.pageCount).arg(results.length).arg(pageLoader.imageCount)
: qsTr("No result"))
: ''
Expand Down

0 comments on commit 42fe094

Please # to comment.