mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-13 00:46:54 +02:00
fix: Rebuild conversations on startup from stored gift wraps
InboxViewer conversations weren't loading automatically on page reload because updateConversations() was only called: 1. When gift wraps change from pending to unlocked (not already decrypted) 2. After sync fetches from relays (requires manual refresh) Now updateConversations() is called immediately after loading stored gift wraps from Dexie, so conversations appear instantly without needing to click refresh. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -203,6 +203,13 @@ class GiftWrapService {
|
||||
for (const event of storedEvents) {
|
||||
eventStore.add(event);
|
||||
}
|
||||
|
||||
// Update conversations from loaded gift wraps (they're already decrypted from cache)
|
||||
// Without this, conversations don't appear until sync fetches from relays
|
||||
this.updateConversations();
|
||||
console.log(
|
||||
`[GiftWrap] Rebuilt conversations from ${storedEvents.length} stored gift wraps`,
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn(`[GiftWrap] Error loading stored gift wraps:`, err);
|
||||
|
||||
Reference in New Issue
Block a user