summaryrefslogtreecommitdiff
path: root/Sora/Data/Settings
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-21 01:53:31 -0800
committerFuwn <[email protected]>2025-02-21 01:53:35 -0800
commit617370e834db97c2c6ce5c5bbd3825fcad013b7f (patch)
tree8d20d45c0cb1169d8c08509e106d0d57b0d71c72 /Sora/Data/Settings
parentfeat: Development commit (diff)
downloadsora-testing-617370e834db97c2c6ce5c5bbd3825fcad013b7f.tar.xz
sora-testing-617370e834db97c2c6ce5c5bbd3825fcad013b7f.zip
feat: Development commit
Diffstat (limited to 'Sora/Data/Settings')
-rw-r--r--Sora/Data/Settings/Settings.swift12
1 files changed, 11 insertions, 1 deletions
diff --git a/Sora/Data/Settings/Settings.swift b/Sora/Data/Settings/Settings.swift
index 3ffa114..c70f1ba 100644
--- a/Sora/Data/Settings/Settings.swift
+++ b/Sora/Data/Settings/Settings.swift
@@ -4,7 +4,7 @@ class Settings: ObservableObject {
#if DEBUG
@AppStorage("detailViewType") var detailViewType: BooruPostFileType = .sample
#else
- @AppStorage("detailViewType") var detailViewType: PostFileType = .original
+ @AppStorage("detailViewType") var detailViewType: BooruPostFileType = .original
#endif
@AppStorage("thumbnailType") var thumbnailType: BooruPostFileType = .preview
@AppStorage("searchSuggestions") var searchSuggestions: Bool = false
@@ -68,4 +68,14 @@ class Settings: ObservableObject {
bookmarks = currentBookmarks
}
+
+ func removeBookmark(withID: UUID) {
+ var currentBookmarks = bookmarks
+
+ currentBookmarks.removeAll { bookmark in
+ bookmark.id == withID
+ }
+
+ bookmarks = currentBookmarks
+ }
}