refactor: allow reset selection by refreshing

This commit is contained in:
Carlos Valente
2024-07-07 21:21:31 +02:00
committed by Carlos Valente
parent 73e23ee323
commit 2877475a35
2 changed files with 16 additions and 15 deletions
@@ -22,10 +22,14 @@ export const sanitiseTitle = (title: string | null) => (title ? title : '{no tit
*/
export const fetchTimerData = (
time: ViewExtendedTimer,
follow: OntimeEvent,
follow: OntimeEvent | null,
selectedId: string | null,
offset: number,
): { message: TimerMessage; timer: number } => {
if (follow === null) {
return { message: TimerMessage.unhandled, timer: 0 };
}
if (selectedId === follow.id) {
// if it is selected, it may not be running
return {