Skip to content

Commit

Permalink
nx: fix db update event
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <radialapps@gmail.com>
  • Loading branch information
pulsejet committed Oct 4, 2023
1 parent ce78d81 commit 810ee10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/native/days.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ const seenABUIDs = new Set<string>();
// Clear the cache whenever the timeline is refreshed
if (has()) {
document.addEventListener('DOMContentLoaded', () => {
utils.bus.on('memories:timeline:soft-refresh', () => daysCache.clear());
utils.bus.on('memories:timeline:hard-refresh', () => daysCache.clear());
utils.bus.on('nativex:db:updated', () => daysCache.clear());
});
}

Expand Down
3 changes: 3 additions & 0 deletions src/services/utils/event-bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export type BusEvent = {

/** Albums were updated for these photos */
'memories:albums:update': IPhoto[];

/** NativeX database was updated */
'nativex:db:updated': null;
};

/**
Expand Down

0 comments on commit 810ee10

Please sign in to comment.