Skip to content

Commit

Permalink
fix: Autosaved sessions did not show up real-time
Browse files Browse the repository at this point in the history
  • Loading branch information
navorite committed Nov 14, 2023
1 parent 4aed966 commit 564ee1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/background/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ browser.alarms.onAlarm.addListener(async (alarm) => {
if (count > autoSaveMaxSessions)
sessionsDB.deleteLastAutosavedSession(count - autoSaveMaxSessions);

const sessions = sessionsDB.lazyLoadSessions();

sendMessage({
message: 'notifyChangeDB',
sessions: await sessions,
selectedId: selectionId
sessionsDB.streamSessions('dateSaved', (sessions) => {
sendMessage({
message: 'notifyChangeDB',
sessions,
selectedId: selectionId
});
});
}
});
Expand Down

0 comments on commit 564ee1f

Please sign in to comment.