Skip to content

Commit

Permalink
Get from store
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Oct 19, 2023
1 parent 735fb8e commit 5191524
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions web/src/routes/[slug=note]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { createRxOneshotReq, filterKind, uniq, type LazyFilter } from 'rx-nostr';
import { tap, merge } from 'rxjs';
import { rxNostr, referencesReqEmit } from '$lib/timelines/MainTimeline';
import { cachedEvents, metadataStore } from '$lib/cache/Events';
import { eventItemStore, metadataStore } from '$lib/cache/Events';
import type { PageData } from './$types';
import { author, readRelays } from '../../stores/Author';
import { pool } from '../../stores/Pool';
Expand Down Expand Up @@ -83,15 +83,13 @@
clear();
const event = cachedEvents.get(eventId);
item = $eventItemStore.get(eventId);
const filters: LazyFilter[] = [
{
'#e': [eventId]
}
];
if (event !== undefined) {
item = new EventItem(event);
} else {
if (item === undefined) {
filters.push({
ids: [eventId]
});
Expand Down

0 comments on commit 5191524

Please sign in to comment.