Show zap comments in threads and show top zap

Changelog-Added: Top zaps
Changelog-Added: Show zap comments in threads
This commit is contained in:
William Casarin
2023-06-09 10:10:33 +02:00
parent 8f237b47eb
commit 043eb5b436
19 changed files with 258 additions and 140 deletions

View File

@@ -35,8 +35,16 @@ struct DamusState {
func add_zap(zap: Zapping) -> Bool {
// store generic zap mapping
self.zaps.add_zap(zap: zap)
let stored = self.events.store_zap(zap: zap)
// thread zaps
if let ev = zap.event, zap.is_in_thread {
replies.count_replies(ev)
events.add_replies(ev: ev)
}
// associate with events as well
return self.events.store_zap(zap: zap)
return stored
}
var pubkey: String {