Refactor direct messages model

We can track the pubkey in the DirectMessageModel instead of having a
janky tuple.
This commit is contained in:
William Casarin
2023-04-15 12:41:00 -07:00
parent 247270f3d3
commit b5a3697d78
8 changed files with 74 additions and 58 deletions

View File

@@ -271,8 +271,7 @@ struct ProfileView: View {
var dmButton: some View {
let dm_model = damus_state.dms.lookup_or_create(profile.pubkey)
let dmview = DMChatView(damus_state: damus_state, pubkey: profile.pubkey)
.environmentObject(dm_model)
let dmview = DMChatView(damus_state: damus_state, dms: dm_model)
return NavigationLink(destination: dmview) {
Image(systemName: "bubble.left.circle")
.profile_button_style(scheme: colorScheme)