commit 731fdb108b4505fd963fb79d99ae4b083b48ecba
parent 2f3737c2b564dd57b16b618a9c06f5574267dc40
Author: William Casarin <jb55@jb55.com>
Date: Thu, 13 Jul 2023 11:17:00 -0700
build: fix a few warnings and errors
Diffstat:
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/damus/Components/Search/SearchHeaderView.swift b/damus/Components/Search/SearchHeaderView.swift
@@ -48,9 +48,9 @@ struct SearchHeaderView: View {
var SearchText: Text {
switch described {
case .hashtag(let ht):
- Text(verbatim: "#" + ht)
+ return Text(verbatim: "#" + ht)
case .unknown:
- Text("Search")
+ return Text("Search")
}
}
diff --git a/damus/ContentView.swift b/damus/ContentView.swift
@@ -396,10 +396,9 @@ struct ContentView: View {
}
.onReceive(handle_notify(.unfollow)) { notif in
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
- guard let state = self.damus_state else { return }
let unfollow = notif.object as! ReferencedId
home.resubscribe(.unfollowing(unfollow))
}
@@ -408,8 +407,6 @@ struct ContentView: View {
guard handle_follow_notif(state: state, notif: notif) else { return }
}
.onReceive(handle_notify(.followed)) { notif in
- guard let state = self.damus_state else { return }
- let follow = notif.object as! ReferencedId
home.resubscribe(.following)
}
.onReceive(handle_notify(.post)) { notif in