diff options
Diffstat (limited to 'Sora/Views/Post/PostGridView.swift')
| -rw-r--r-- | Sora/Views/Post/PostGridView.swift | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Sora/Views/Post/PostGridView.swift b/Sora/Views/Post/PostGridView.swift index 2054ef1..625cb1e 100644 --- a/Sora/Views/Post/PostGridView.swift +++ b/Sora/Views/Post/PostGridView.swift @@ -84,18 +84,15 @@ struct PostGridView: View { #endif .toolbar { if !manager.tags.isEmpty { - ToolbarItem { - let contained = settings.bookmarks.contains(where: { $0.tags == manager.tags }) - - Button(action: { - contained ? settings.removeBookmark(withTags: manager.tags) : settings.addBookmark(tags: manager.tags) - }) { - Label("Bookmark", systemImage: - contained ? - "bookmark.fill" : - "bookmark") + #if os(macOS) + ToolbarItem { + PostGridBookmarkButtonView() } - } + #else + ToolbarItem(placement: .bottomBar) { + PostGridBookmarkButtonView() + } + #endif } } .navigationTitle("Posts") |