mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 14:04:21 +01:00
fix: avoid updating cache if event is old
This commit is contained in:
@@ -4,6 +4,7 @@ import uniqBy from 'lodash/uniqBy';
|
||||
import { utils } from 'nostr-tools';
|
||||
|
||||
import useConfig from '@/core/useConfig';
|
||||
import { sortEvents } from '@/nostr/event/comparator';
|
||||
import usePool from '@/nostr/usePool';
|
||||
import useStats from '@/nostr/useStats';
|
||||
|
||||
@@ -29,9 +30,6 @@ export type UseSubscriptionProps = {
|
||||
debugId?: string;
|
||||
};
|
||||
|
||||
const sortEvents = (events: NostrEvent[]) =>
|
||||
Array.from(events).sort((a, b) => b.created_at - a.created_at);
|
||||
|
||||
let count = 0;
|
||||
|
||||
const { setActiveSubscriptions } = useStats();
|
||||
|
||||
Reference in New Issue
Block a user