Add setting to hide reactions

Changelog-Added: Add setting to hide reactions
This commit is contained in:
2023-04-17 03:04:18 +02:00
committed by William Casarin
parent 681e0f0be9
commit 66641fc9ae
14 changed files with 84 additions and 42 deletions
+7 -4
View File
@@ -467,13 +467,13 @@ struct ContentView: View {
self.damus_state?.pool.connect_to_disconnected()
}
.onReceive(handle_notify(.new_mutes)) { notif in
home.filter_muted()
home.filter_events()
}
.onReceive(handle_notify(.mute_thread)) { notif in
home.filter_muted()
home.filter_events()
}
.onReceive(handle_notify(.unmute_thread)) { notif in
home.filter_muted()
home.filter_events()
}
.onReceive(handle_notify(.local_notification)) { notif in
@@ -498,6 +498,9 @@ struct ContentView: View {
open_event(ev: target)
}
}
.onReceive(handle_notify(.hide_reactions)) { notif in
home.filter_events()
}
.alert(NSLocalizedString("Deleted Account", comment: "Alert message to indicate this is a deleted account"), isPresented: $is_deleted_account) {
Button(NSLocalizedString("Logout", comment: "Button to close the alert that informs that the current account has been deleted.")) {
is_deleted_account = false
@@ -841,7 +844,7 @@ func find_event(state: DamusState, evid: String, search_type: SearchType, find_f
var filter = search_type == .event ? NostrFilter.filter_ids([ evid ]) : NostrFilter.filter_authors([ evid ])
if search_type == .profile {
filter.kinds = [0]
filter.kinds = [NostrKind.metadata.rawValue]
}
filter.limit = 1