mirror of
https://github.com/hoornet/vega.git
synced 2026-05-07 12:49:13 -07:00
SQLite-backed notifications, WoT profile fix, reaction queue fix
Notifications now load instantly from SQLite on startup instead of waiting for relay responses. New events merge in as they arrive. Read state persists in DB across restarts. Also: filter profile owner from WoT followers list, make "+N more" clickable to expand, fix reaction throttle queue jamming on errors.
This commit is contained in:
@@ -24,12 +24,18 @@ function throttledFetch(eventId: string, pubkey?: string): Promise<GroupedReacti
|
||||
const promise = new Promise<GroupedReactions>((resolve) => {
|
||||
const doFetch = () => {
|
||||
activeCount++;
|
||||
fetchReactions(eventId, pubkey).then((result) => {
|
||||
activeCount--;
|
||||
pending.delete(eventId);
|
||||
resolve(result);
|
||||
runNext();
|
||||
});
|
||||
fetchReactions(eventId, pubkey)
|
||||
.then((result) => {
|
||||
resolve(result);
|
||||
})
|
||||
.catch(() => {
|
||||
resolve({ groups: new Map(), myReactions: new Set(), total: 0 });
|
||||
})
|
||||
.finally(() => {
|
||||
activeCount--;
|
||||
pending.delete(eventId);
|
||||
runNext();
|
||||
});
|
||||
};
|
||||
|
||||
if (activeCount < MAX_CONCURRENT) {
|
||||
|
||||
Reference in New Issue
Block a user