fix performance issue

This commit is contained in:
hzrd149 2024-01-31 10:27:47 +00:00
parent c906f88d61
commit 3cc22a7ce3
4 changed files with 430 additions and 434 deletions

View File

@ -56,7 +56,7 @@
"match-sorter": "^6.3.1",
"nanoid": "^5.0.4",
"ngeohash": "^0.6.3",
"nostr-idb": "^2.0.1",
"nostr-idb": "^2.1.0",
"nostr-tools": "^2.1.3",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",

View File

@ -92,7 +92,7 @@ async function nip04Decrypt(pubkey: string, data: string): Promise<string> {
}
const amberSignerService = {
supported: navigator.userAgent.includes("Android") && navigator.clipboard,
supported: navigator.userAgent.includes("Android") && navigator.clipboard && navigator.clipboard.readText,
getPublicKey,
signEvent,
nip04Encrypt,

View File

@ -56,7 +56,7 @@ class EventReactionsService {
const filter: Filter = { "#e": ids, kinds: [kinds.Reaction] };
// load from local relay
relayRequest(localRelay, [filter]).then((events) => events.forEach((e) => this.handleEvent(e)));
relayRequest(localRelay, [filter]).then((events) => events.forEach((e) => this.handleEvent(e, true)));
const request = new NostrRequest([relay]);
request.onEvent.subscribe(this.handleEvent, this);

858
yarn.lock

File diff suppressed because it is too large Load Diff