Skip to content

Commit 035d4cc

Browse files
committed
fix: readded active history caching
1 parent f90c0af commit 035d4cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/store/modules/activity.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,12 @@ const mutations = {
495495
state.active.duration = null;
496496
state.active.events = null;
497497

498-
state.active.history = {};
498+
// Ensures that active history isn't being fully reloaded on every date change
499+
// (see caching done in query_active_history and query_active_history_android)
500+
// FIXME: Better detection of when to actually clear (such as on force reload, hostname change)
501+
if (Object.keys(state.active.history).length === 0) {
502+
state.active.history = {};
503+
}
499504
},
500505

501506
set_available(state, data) {

0 commit comments

Comments
 (0)