mirror of
https://github.com/hoornet/vega.git
synced 2026-07-16 21:48:09 -07:00
Increase Large/XL font sizes, enlarge account switcher, fix relay drop and bookmark persistence
- Large font 16→17px, Extra Large 18→20px - Account avatar w-8→w-10, name and arrow text larger - resetNDK preserves outbox-discovered relay URLs instead of dropping to fallback 3 - BookmarkView merges relay results with cache instead of replacing, so cached notes survive timeouts
This commit is contained in:
@@ -91,10 +91,16 @@ export function BookmarkView() {
|
||||
if (!cancelled) {
|
||||
const fetched = results.filter((e): e is NDKEvent => e !== null);
|
||||
// Separate articles (kind 30023) bookmarked via e-tag from notes
|
||||
const notesOnly = fetched.filter((e) => e.kind !== 30023)
|
||||
.sort((a, b) => (b.created_at ?? 0) - (a.created_at ?? 0));
|
||||
const fetchedNotes = fetched.filter((e) => e.kind !== 30023);
|
||||
const articlesFromETag = fetched.filter((e) => e.kind === 30023);
|
||||
setNotes(notesOnly);
|
||||
// Merge with existing (cached) notes — don't replace, so cached notes survive relay timeouts
|
||||
setNotes((prev) => {
|
||||
const byId = new Map(prev.map((e) => [e.id, e]));
|
||||
for (const e of fetchedNotes) byId.set(e.id, e);
|
||||
return Array.from(byId.values())
|
||||
.filter((e) => bookmarkedIds.includes(e.id!))
|
||||
.sort((a, b) => (b.created_at ?? 0) - (a.created_at ?? 0));
|
||||
});
|
||||
// Merge any articles found via e-tag into the articles list
|
||||
if (articlesFromETag.length > 0) {
|
||||
setArticles((prev) => {
|
||||
|
||||
Reference in New Issue
Block a user