mirror of
https://github.com/hoornet/vega.git
synced 2026-05-10 14:19:12 -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:
@@ -104,6 +104,13 @@ export async function resetNDK(): Promise<void> {
|
||||
const oldInstance = ndk;
|
||||
const oldSigner = oldInstance?.signer ?? null;
|
||||
|
||||
// Preserve all relay URLs (stored + outbox-discovered) before resetting
|
||||
const oldRelayUrls = oldInstance?.pool?.relays
|
||||
? Array.from(oldInstance.pool.relays.keys()).map(normalizeRelayUrl)
|
||||
: [];
|
||||
const storedUrls = getStoredRelayUrls();
|
||||
const allUrls = [...new Set([...storedUrls, ...oldRelayUrls])];
|
||||
|
||||
// Disconnect all relays on old instance
|
||||
if (oldInstance?.pool?.relays) {
|
||||
for (const relay of oldInstance.pool.relays.values()) {
|
||||
@@ -111,9 +118,9 @@ export async function resetNDK(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// Create fresh instance
|
||||
// Create fresh instance with all known relay URLs
|
||||
ndk = new NDK({
|
||||
explicitRelayUrls: getStoredRelayUrls(),
|
||||
explicitRelayUrls: allUrls,
|
||||
outboxRelayUrls: OUTBOX_RELAYS,
|
||||
});
|
||||
ndkCreatedAt = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user