[graphics/koko/release/26.08] src/qml/gallery: GalleryPage: Fix bookmarking

Oliver Beard <[email protected]> Tue, 4 Aug 2026 13:30:43 +0000 (UTC)
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 90afba48cd1d08dd3593fce55f253ac6af51bf9b by Oliver Beard.
Committed on 04/08/2026 at 13:25.
Pushed by olib into branch 'release/26.08'.

GalleryPage: Fix bookmarking

Fix folder bookmarking QML-side, pending proper action updating C++ side.

M  +3    -3    src/qml/gallery/GalleryPage.qml

https://invent.kde.org/graphics/koko/-/commit/90afba48cd1d08dd3593fce55f253ac6af51bf9b

diff --git a/src/qml/gallery/GalleryPage.qml b/src/qml/gallery/GalleryPage.qml
index 815c8079..3b02bc0a 100644
--- a/src/qml/gallery/GalleryPage.qml
+++ b/src/qml/gallery/GalleryPage.qml
@@ -272,18 +272,18 @@ Kirigami.ScrollablePage {
             visible: isFolderView
             displayHint: Kirigami.DisplayHint.IconOnly
             onToggled: {
-                if (!(galleryModel instanceof Koko.GalleryFolderModel) || galleryModel.url == undefined) {
+                if (!(galleryModel instanceof Koko.GalleryFolderModel) || galleryModel.path == undefined) {
                     return;
                 }
 
                 if (page.isBookmarked) {
-                    const index = Koko.Config.savedFolders.indexOf(galleryModel.url.toString().replace("file:///", "file:/"));
+                    const index = Koko.Config.savedFolders.indexOf(galleryModel.path.toString().replace("file:///", "file:/"));
                     if (index !== -1) {
                         Koko.Config.savedFolders.splice(index, 1);
                         Koko.Config.save();
                     }
                 } else {
-                    Koko.Config.savedFolders.push(galleryModel.url.toString().replace("file:///", "file:/"));
+                    Koko.Config.savedFolders.push(galleryModel.path.toString().replace("file:///", "file:/"));
                     Koko.Config.save();
                 }
             }