notify: switch over to new typesafe notifications

This commit is contained in:
William Casarin
2023-07-30 10:50:41 -07:00
parent 80063af19a
commit b40c595a7c
39 changed files with 129 additions and 289 deletions

View File

@@ -93,13 +93,11 @@ struct SearchHeaderView: View {
}
}
}
.onReceive(handle_notify(.followed)) { notif in
let ref = notif.object as! ReferencedId
.onReceive(handle_notify(.followed)) { ref in
guard hashtag_matches_search(desc: self.described, ref: ref) else { return }
self.is_following = true
}
.onReceive(handle_notify(.unfollowed)) { notif in
let ref = notif.object as! ReferencedId
.onReceive(handle_notify(.unfollowed)) { ref in
guard hashtag_matches_search(desc: self.described, ref: ref) else { return }
self.is_following = false
}