From d6ae371623eb5eab85de267a375ea60409ce702c Mon Sep 17 00:00:00 2001 From: Vishal <64505169+vishalxl@users.noreply.github.com> Date: Sat, 26 Nov 2022 01:27:54 +0530 Subject: [PATCH] fixed issue where double top trees were built when a dummy top tree was being received As tested with event id 0245d18adb696127a6ba67e1be9c2f9ebd7ad61c28d9aae631c30b6d60392ee0 --- lib/tree_ds.dart | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/tree_ds.dart b/lib/tree_ds.dart index 14f6b75..551ccde 100644 --- a/lib/tree_ds.dart +++ b/lib/tree_ds.dart @@ -1261,11 +1261,7 @@ class Store { // its a replacement. if( gDebug >= 0 && newEvent.eventData.id == gCheckEventId) log.info("In processIncoming: Replaced old dummy event of id: ${newEvent.eventData.id}"); tree.event = newEvent; - //tree = topPosts.removeAt(i); allChildEventsMap[tree.event.eventData.id] = tree; - if( newEvent.eventData.createdAt > getSecondsDaysAgo(gDontHighlightEventsOlderThan)) { - newEventIdsSet.add(newEvent.eventData.id); - } return; } } @@ -1275,7 +1271,6 @@ class Store { // add to new-notification list only if this is a recent event ( because relays may send old events, and we dont want to highlight stale messages) newEventIdsSet.add(newEvent.eventData.id); - }); // now go over the newly inserted event, and add it to the tree for kind 1 events, add 42 events to channels. rest ( such as kind 0, kind 3, kind 7) are ignored.