Fix issue where repost and like counts would not appear
Previously, HomeModel could listen to all subscriptions throughout the app, and it would handle reaction and repost counting. Once moved to the local relay model, HomeModel no longer had access to all subscriptions, causing those counts to disappear. The issue was fixed by doing the counting from ThreadModel itself, which better isolates concerns throughout the app. Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -190,6 +190,12 @@ class ThreadModel: ObservableObject {
|
||||
self.add_event(ev, keypair: damus_state.keypair)
|
||||
}
|
||||
}
|
||||
else if ev.known_kind == .boost {
|
||||
damus_state.boosts.add_event(ev, target: original_event.id)
|
||||
}
|
||||
else if ev.known_kind == .like {
|
||||
damus_state.likes.add_event(ev, target: original_event.id)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: External control interface
|
||||
|
||||
Reference in New Issue
Block a user