Fix meeting alert catch-up window and skip redundant block switch
- Extend start-time trigger window from 15s to 5 min so opening the dashboard late still marks the meeting as started - Only play chime and show TV overlay when within 30s of start time - Skip switchBlock call when the session is already on that block Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,18 +104,22 @@ export function useMeetingAlerts(onMeetingStart = null) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// At start time: full-screen TV alert, clear dashboard toasts
|
// At start time: full-screen TV alert, clear dashboard toasts.
|
||||||
if (secs <= 0 && secs >= -15 && !triggered.has(keyStart)) {
|
// Use a 5-minute catch-up window so opening the dashboard late still triggers.
|
||||||
|
if (secs <= 0 && secs >= -300 && !triggered.has(keyStart)) {
|
||||||
triggered.add(keyStart)
|
triggered.add(keyStart)
|
||||||
dashboardAlerts.value = dashboardAlerts.value.filter(a => a.blockId !== block.id)
|
dashboardAlerts.value = dashboardAlerts.value.filter(a => a.blockId !== block.id)
|
||||||
|
// Only play chime and show TV overlay when meeting just started (within 30s)
|
||||||
|
if (secs >= -30) {
|
||||||
playChime(false)
|
playChime(false)
|
||||||
if (onMeetingStart) onMeetingStart(block.id)
|
|
||||||
tvAlert.value = {
|
tvAlert.value = {
|
||||||
blockId: block.id,
|
blockId: block.id,
|
||||||
label: blockLabel(block),
|
label: blockLabel(block),
|
||||||
autoDismissAt: new Date(Date.now() + 30000),
|
autoDismissAt: new Date(Date.now() + 30000),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (onMeetingStart) onMeetingStart(block.id)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ const scheduleStore = useScheduleStore()
|
|||||||
const activeChild = computed(() => childrenStore.activeChild)
|
const activeChild = computed(() => childrenStore.activeChild)
|
||||||
const meetingAlerts = useMeetingAlerts((blockId) => {
|
const meetingAlerts = useMeetingAlerts((blockId) => {
|
||||||
if (!scheduleStore.session) return
|
if (!scheduleStore.session) return
|
||||||
|
if (scheduleStore.session.current_block_id === blockId) return
|
||||||
scheduleStore.switchBlock(scheduleStore.session.id, blockId)
|
scheduleStore.switchBlock(scheduleStore.session.id, blockId)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user