damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit a007e18add771e149c29266cd858d61e5b247a27
parent 7a8bfffc298fbebbb6816c37512c5f4578934ead
Author: William Casarin <jb55@jb55.com>
Date:   Sun,  7 May 2023 09:30:05 -0700

Dismiss bookmarks view when switching tabs

Changelog-Fixed: Dismiss bookmarks view when switching tabs

Diffstat:
Mdamus/Views/BookmarksView.swift | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/damus/Views/BookmarksView.swift b/damus/Views/BookmarksView.swift @@ -13,6 +13,7 @@ struct BookmarksView: View { private let bookmarksTitle = NSLocalizedString("Bookmarks", comment: "Title of bookmarks view") @State private var clearAllAlert: Bool = false + @Environment(\.dismiss) var dismiss @ObservedObject var manager: BookmarksManager init(state: DamusState) { @@ -41,6 +42,9 @@ struct BookmarksView: View { } } } + .onReceive(handle_notify(.switched_timeline)) { _ in + dismiss() + } .navigationBarTitleDisplayMode(.inline) .navigationTitle(bookmarksTitle) .toolbar {