Show chatroom first if content contains #chat

Changelog-Added: Load chat view first if content contains #chat
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-08-09 16:08:05 -07:00
parent d223d045e8
commit 9420a7a0ad
4 changed files with 28 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ struct InnerTimelineView: View {
var body: some View {
LazyVStack {
ForEach(events, id: \.id) { (ev: NostrEvent) in
let tv = ThreadView(thread: ThreadModel(event: ev, pool: damus.pool, privkey: damus.keypair.privkey), damus: damus)
let tv = ThreadView(thread: ThreadModel(event: ev, pool: damus.pool, privkey: damus.keypair.privkey), damus: damus, is_chatroom: has_hashtag(ev.tags, hashtag: "chat"))
NavigationLink(destination: tv) {
EventView(event: ev, highlight: .none, has_action_bar: true, damus: damus)