diff options
| author | Fuwn <[email protected]> | 2025-07-08 06:51:39 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-08 06:51:39 -0700 |
| commit | d52c5891f849818a8d2d70af6eaec9aad2a30daa (patch) | |
| tree | c3c575a4f8236a164bd92195d1a078971374f68f /Sora | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-d52c5891f849818a8d2d70af6eaec9aad2a30daa.tar.xz sora-testing-d52c5891f849818a8d2d70af6eaec9aad2a30daa.zip | |
feat: Development commit
Diffstat (limited to 'Sora')
| -rw-r--r-- | Sora/Views/BookmarkMenuButtonView.swift | 2 | ||||
| -rw-r--r-- | Sora/Views/Generic/GenericListView.swift | 36 |
2 files changed, 19 insertions, 19 deletions
diff --git a/Sora/Views/BookmarkMenuButtonView.swift b/Sora/Views/BookmarkMenuButtonView.swift index 6877c5b..c46894d 100644 --- a/Sora/Views/BookmarkMenuButtonView.swift +++ b/Sora/Views/BookmarkMenuButtonView.swift @@ -24,7 +24,7 @@ struct BookmarkMenuButtonView: View { } }) { if isBookmarked { - Label("Remove Bookmark\(tags.count == 1 ? "" : "s")", systemImage: "bookmark.fill") + Label("Remove Bookmark", systemImage: "bookmark.fill") } else { Label("Bookmark Tag\(tags.count == 1 ? "" : "s")", systemImage: "bookmark") } diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift index 53ad364..0cad426 100644 --- a/Sora/Views/Generic/GenericListView.swift +++ b/Sora/Views/Generic/GenericListView.swift @@ -361,6 +361,24 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { Label("Add to Search", systemImage: "plus") } + if allowBookmarking { + let isBookmarked = settings.bookmarks.contains { $0.tags == item.tags } + + Button(action: { + if isBookmarked { + settings.removeBookmark(withTags: item.tags) + } else { + settings.addBookmark(provider: settings.preferredBooru, tags: item.tags) + } + }) { + if isBookmarked { + Label("Remove Bookmark", systemImage: "bookmark.fill") + } else { + Label("Bookmark Tag\(item.tags.count == 1 ? "" : "s")", systemImage: "bookmark") + } + } + } + Menu { ForEach(settings.folders.filter { $0.topLevelName == nil }, id: \.id) { folder in if item.folder != folder.id { @@ -411,24 +429,6 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { } } - if allowBookmarking { - let isBookmarked = settings.bookmarks.contains { $0.tags == item.tags } - - Button(action: { - if isBookmarked { - settings.removeBookmark(withTags: item.tags) - } else { - settings.addBookmark(provider: settings.preferredBooru, tags: item.tags) - } - }) { - if isBookmarked { - Label("Unbookmark Tag\(item.tags.count == 1 ? "" : "s")", systemImage: "bookmark.fill") - } else { - Label("Bookmark Tag\(item.tags.count == 1 ? "" : "s")", systemImage: "bookmark") - } - } - } - Button { removeActionUUID(item.id) } label: { |