Sort feed and fix duplicates #19

Closed
opened 2022-11-26 07:31:39 +13:00 by mikedilger · 2 comments
mikedilger commented 2022-11-26 07:31:39 +13:00 (Migrated from github.com)

The feed is coming through unsorted

The feed is coming through unsorted
mikedilger commented 2022-11-26 12:00:57 +13:00 (Migrated from github.com)

The code is sorting database-loaded events. It is not resorting relay-provided events.

Verify this and debug if not true. Could be DateAgo is broken too. Tabbing out and back gives different DateAgo's. Will open separate issue for that.

The code is sorting database-loaded events. It is not resorting relay-provided events. Verify this and debug if not true. Could be DateAgo is broken too. Tabbing out and back gives different DateAgo's. Will open separate issue for that.
mikedilger commented 2022-11-27 08:52:01 +13:00 (Migrated from github.com)

I addressed this by sending all new events through the overlord, which keeps a 'feed' array that it keeps sorted, and sends both addevents and replacefeed to the client every time a new event comes in.

I addressed this by sending all new events through the overlord, which keeps a 'feed' array that it keeps sorted, and sends both `addevents` and `replacefeed` to the client every time a new event comes in.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nostr/gossip#19
No description provided.