@@ -302,15 +302,15 @@
/>
{/if}
{#if !fullView}
- {#if loadingStats}
- Loading stats...
- {:else}
- {commentCount} {commentCount === 1 ? 'comment' : 'comments'}
- {#if latestResponseTime}
- Last: {getLatestResponseTime()}
- {/if}
- {#if zapCount > 0}
- ⚡ {zapTotal.toLocaleString()} sats ({zapCount})
+ {#if loadingStats}
+ Loading stats...
+ {:else}
+ {commentCount} {commentCount === 1 ? 'comment' : 'comments'}
+ {#if latestResponseTime}
+ Last: {getLatestResponseTime()}
+ {/if}
+ {#if zapCount > 0}
+ ⚡ {zapTotal.toLocaleString()} sats ({zapCount})
{/if}
{/if}
{:else}
diff --git a/src/lib/modules/discussions/DiscussionVoteButtons.svelte b/src/lib/modules/discussions/DiscussionVoteButtons.svelte
index 03ebf6a..edde9ea 100644
--- a/src/lib/modules/discussions/DiscussionVoteButtons.svelte
+++ b/src/lib/modules/discussions/DiscussionVoteButtons.svelte
@@ -244,7 +244,7 @@
// Cache of checked reaction IDs to avoid repeated deletion checks
const checkedReactionIds = new Set();
-
+
async function filterDeletedReactions(reactions: NostrEvent[]): Promise {
if (reactions.length === 0) return reactions;
diff --git a/src/lib/modules/feed/FeedPage.svelte b/src/lib/modules/feed/FeedPage.svelte
index cb02a1e..a0ef58b 100644
--- a/src/lib/modules/feed/FeedPage.svelte
+++ b/src/lib/modules/feed/FeedPage.svelte
@@ -32,7 +32,7 @@
let isMounted = $state(true);
let initialLoadComplete = $state(false);
let loadInProgress = $state(false);
-
+
// Load waiting room events into feed
function loadWaitingRoomEvents() {
if (waitingRoomEvents.length === 0) return;
@@ -67,9 +67,9 @@
filters,
relays,
{
- relayFirst: true,
- useCache: true,
- cacheResults: true,
+ relayFirst: true,
+ useCache: true,
+ cacheResults: true,
timeout: config.standardTimeout
}
);
@@ -89,7 +89,7 @@
const eventMap = new Map(events.map(e => [e.id, e]));
for (const event of filtered) {
eventMap.set(event.id, event);
- }
+ }
const sorted = Array.from(eventMap.values()).sort((a, b) => b.created_at - a.created_at);
events = sorted;
@@ -115,10 +115,10 @@
const feedKinds = getFeedKinds().filter(k => k !== KIND.DISCUSSION_THREAD);
const cached = await getRecentFeedEvents(feedKinds, 15 * 60 * 1000, config.feedLimit);
const filtered = cached.filter(e =>
- e.kind !== KIND.DISCUSSION_THREAD &&
- getKindInfo(e.kind).showInFeed === true
- );
-
+ e.kind !== KIND.DISCUSSION_THREAD &&
+ getKindInfo(e.kind).showInFeed === true
+ );
+
if (filtered.length > 0 && isMounted) {
const unique = Array.from(new Map(filtered.map(e => [e.id, e])).values());
events = unique.sort((a, b) => b.created_at - a.created_at);
@@ -136,9 +136,9 @@
relayError = `Relay ${singleRelay} is unavailable.`;
loading = false;
return;
+ }
}
- }
-
+
const feedKinds = getFeedKinds().filter(k => k !== KIND.DISCUSSION_THREAD);
const filters = feedKinds.map(k => ({ kinds: [k], limit: config.feedLimit }));
@@ -168,8 +168,8 @@
const eventMap = new Map(events.map(e => [e.id, e]));
for (const event of filtered) {
eventMap.set(event.id, event);
- }
-
+ }
+
const sorted = Array.from(eventMap.values()).sort((a, b) => b.created_at - a.created_at);
events = sorted;
@@ -206,7 +206,7 @@
const eventIds = new Set([...events.map(e => e.id), ...waitingRoomEvents.map(e => e.id)]);
if (!eventIds.has(event.id)) {
waitingRoomEvents = [...waitingRoomEvents, event].sort((a, b) => b.created_at - a.created_at);
- }
+ }
},
() => {}
);
diff --git a/src/lib/modules/feed/FeedPost.svelte b/src/lib/modules/feed/FeedPost.svelte
index a833fb3..24d8c6a 100644
--- a/src/lib/modules/feed/FeedPost.svelte
+++ b/src/lib/modules/feed/FeedPost.svelte
@@ -27,7 +27,7 @@
}
let { post, fullView = false, preloadedReactions, parentEvent: providedParentEvent, quotedEvent: providedQuotedEvent }: Props = $props();
-
+
// Check if this event is bookmarked (async, so we use state)
// Only check if user is logged in
let bookmarked = $state(false);
@@ -93,7 +93,7 @@
if (isLoggedIn) {
isBookmarked(post.id).then(b => {
if (!cancelled) {
- bookmarked = b;
+ bookmarked = b;
}
});
} else {
@@ -462,8 +462,8 @@
const urlWithoutProtocol = normalized.replace(/^https?:\/\//i, '');
if (content.includes(normalized.toLowerCase()) || content.includes(urlWithoutProtocol.toLowerCase())) {
return true;
- }
-
+ }
+
// Check if URL appears in markdown image syntax 
const markdownImageRegex = /!\[.*?\]\((.*?)\)/gi;
let match;
@@ -471,7 +471,7 @@
const markdownUrl = normalizeUrl(match[1]);
if (markdownUrl === normalized) {
return true;
- }
+ }
}
// Check if URL appears in HTML img/video/audio tags
@@ -480,7 +480,7 @@
const htmlUrl = normalizeUrl(match[2]);
if (htmlUrl === normalized) {
return true;
- }
+ }
}
return false;
@@ -493,14 +493,14 @@
} catch {
return url;
}
- }
-
+ }
+
// Extract media URLs from event tags (image, imeta, file) - for feed view only
// Excludes URLs that are already in the content
function getMediaUrls(): string[] {
const urls: string[] = [];
const seen = new Set();
-
+
// 1. Image tag (NIP-23)
const imageTag = post.tags.find((t) => t[0] === 'image');
if (imageTag && imageTag[1]) {
@@ -509,7 +509,7 @@
urls.push(imageTag[1]);
seen.add(normalized);
}
- }
+ }
// 2. imeta tags (NIP-92)
for (const tag of post.tags) {
@@ -536,7 +536,7 @@
if (!seen.has(normalized) && !isUrlInContent(tag[1])) {
urls.push(tag[1]);
seen.add(normalized);
- }
+ }
}
}
@@ -590,11 +590,11 @@
- {@const title = getTitle()}
- {#if title && title !== 'Untitled'}
+ {@const title = getTitle()}
+ {#if title && title !== 'Untitled'}
- {title}
-
+ {title}
+
{/if}
@@ -608,21 +608,21 @@
-
+
{getRelativeTime()}
- {#if getClientName()}
+ {#if getClientName()}
via {getClientName()}
- {/if}
- {#if post.kind === KIND.DISCUSSION_THREAD}
+ {/if}
+ {#if post.kind === KIND.DISCUSSION_THREAD}
{@const topics = getTopics()}
- {#if topics.length === 0}
+ {#if topics.length === 0}
General
- {:else}
- {#each topics.slice(0, 3) as topic}
+ {:else}
+ {#each topics.slice(0, 3) as topic}
{topic}
- {/each}
- {/if}
+ {/each}
+ {/if}
{/if}
@@ -636,7 +636,7 @@
- {:else}
+ {:else}
{/if}
-
- {title} -
+ {title} + {/if}@@ -636,7 +636,7 @@
No notifications yet.
@@ -707,8 +707,8 @@ {#each interactionsWithMe as interaction (interaction.id)}