Fix schedule blocks persisting after End Day without refresh
Clear blocks, completedBlockIds, and day times alongside session when the is_active: false WS event is received. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,9 +51,13 @@ export const useScheduleStore = defineStore('schedule', () => {
|
||||
// Session ended
|
||||
if (event.is_active === false) {
|
||||
session.value = null
|
||||
blocks.value = []
|
||||
completedBlockIds.value = []
|
||||
isPaused.value = false
|
||||
blockStartedAt.value = null
|
||||
blockElapsedOffset.value = 0
|
||||
dayStartTime.value = null
|
||||
dayEndTime.value = null
|
||||
return
|
||||
}
|
||||
// Pause — accumulate elapsed, stop counting
|
||||
|
||||
Reference in New Issue
Block a user