From 74156719008bfcdec5ba8a02b58ae374f7087e31 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 10 Feb 2023 11:08:46 -0800 Subject: [PATCH] Load zaps, likes and reposts when you open a thread Changelog-Fixed: Load zaps, likes and reposts when you open a thread --- damus/Views/ThreadV2View.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/damus/Views/ThreadV2View.swift b/damus/Views/ThreadV2View.swift index 6bce9fe8..94038f3c 100644 --- a/damus/Views/ThreadV2View.swift +++ b/damus/Views/ThreadV2View.swift @@ -47,6 +47,7 @@ struct BuildThreadV2View: View { @State var thread: ThreadV2? = nil @State var current_events_uuid: String = "" + @State var extra_events_uuid: String = "" @State var childs_events_uuid: String = "" @State var parents_events_uuids: [String] = [] @@ -197,13 +198,15 @@ struct BuildThreadV2View: View { self.unsubscribe_all() print("ThreadV2View: Reload!") + var extra = NostrFilter.filter_kinds([9735, 6, 7]) + extra.referenced_ids = [ self.event_id ] + // Get the current event current_events_uuid = subscribe(filters: [ - NostrFilter( - ids: [self.event_id], - limit: 1 - ) + NostrFilter(ids: [self.event_id], limit: 1) ]) + + extra_events_uuid = subscribe(filters: [extra]) print("subscribing to threadV2 \(event_id) with sub_id \(current_events_uuid)") }