build: fix a few warnings and errors

This commit is contained in:
William Casarin
2023-07-13 11:17:00 -07:00
parent 2f3737c2b5
commit 731fdb108b
2 changed files with 3 additions and 6 deletions

View File

@@ -48,9 +48,9 @@ struct SearchHeaderView: View {
var SearchText: Text { var SearchText: Text {
switch described { switch described {
case .hashtag(let ht): case .hashtag(let ht):
Text(verbatim: "#" + ht) return Text(verbatim: "#" + ht)
case .unknown: case .unknown:
Text("Search") return Text("Search")
} }
} }

View File

@@ -396,10 +396,9 @@ struct ContentView: View {
} }
.onReceive(handle_notify(.unfollow)) { notif in .onReceive(handle_notify(.unfollow)) { notif in
guard let state = self.damus_state else { return } guard let state = self.damus_state else { return }
guard let unfollow = handle_unfollow_notif(state: state, notif: notif) else { return } _ = handle_unfollow_notif(state: state, notif: notif)
} }
.onReceive(handle_notify(.unfollowed)) { notif in .onReceive(handle_notify(.unfollowed)) { notif in
guard let state = self.damus_state else { return }
let unfollow = notif.object as! ReferencedId let unfollow = notif.object as! ReferencedId
home.resubscribe(.unfollowing(unfollow)) home.resubscribe(.unfollowing(unfollow))
} }
@@ -408,8 +407,6 @@ struct ContentView: View {
guard handle_follow_notif(state: state, notif: notif) else { return } guard handle_follow_notif(state: state, notif: notif) else { return }
} }
.onReceive(handle_notify(.followed)) { notif in .onReceive(handle_notify(.followed)) { notif in
guard let state = self.damus_state else { return }
let follow = notif.object as! ReferencedId
home.resubscribe(.following) home.resubscribe(.following)
} }
.onReceive(handle_notify(.post)) { notif in .onReceive(handle_notify(.post)) { notif in