Fix thread OOM: hard-truncate events client-side, remove batchFetchProfileAges from thread

This commit is contained in:
Jure
2026-04-13 22:16:02 +02:00
parent a87abb6d97
commit 018ee0e0f3
2 changed files with 8 additions and 9 deletions
+1 -2
View File
@@ -4,7 +4,7 @@ import { useAutoResize } from "../../hooks/useAutoResize";
import { useUIStore } from "../../stores/ui";
import { useUserStore } from "../../stores/user";
import { useMuteStore } from "../../stores/mute";
import { fetchNoteById, fetchThreadEvents, fetchAncestors, publishReply, getNDK, ensureConnected, batchFetchProfileAges } from "../../lib/nostr";
import { fetchNoteById, fetchThreadEvents, fetchAncestors, publishReply, getNDK, ensureConnected } from "../../lib/nostr";
import { buildThreadTree, getRootEventId } from "../../lib/threadTree";
import type { ThreadNode } from "../../lib/threadTree";
import { debug } from "../../lib/debug";
@@ -106,7 +106,6 @@ export function ThreadView() {
const built = buildThreadTree(root.id, allEvents);
setTree(built);
batchFetchProfileAges([...new Set(allEvents.map((e) => e.pubkey))]);
} catch (err) {
debug.error("Failed to load thread:", err);
if (!cancelled) setLoadError(`Failed to load: ${err}`);