Skip to content

Commit 97956b9

Browse files
Fix started from tray resetting
1 parent e12d480 commit 97956b9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/main/lib/breaks.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ export function endPopupBreak(): void {
167167
const existingBreakTime = breakTime;
168168
const now = moment();
169169
havingBreak = false;
170+
startedFromTray = false;
170171

171172
// If there's no future break scheduled, create a normal break
172173
if (!existingBreakTime || existingBreakTime <= now) {
@@ -320,9 +321,7 @@ export function startBreakNow(): void {
320321
}
321322

322323
export function wasStartedFromTray(): boolean {
323-
const result = startedFromTray;
324-
startedFromTray = false; // Reset the flag after checking
325-
return result;
324+
return startedFromTray;
326325
}
327326

328327
function tick(): void {

0 commit comments

Comments
 (0)