Refines timed prompt notification duration logic

Adjusts notification duration calculation to improve timing precision for different delay intervals

Ensures consistent minimum notification display time while preventing potential overlap or flickering
This commit is contained in:
AlexKucera committed 2025-10-31 13:36:03 +01:00
1 parent 5bf804b266
commit 4cb2308bd6
1 file changed
+2 -2
+2 -2
View File
@@ -177,8 +177,8 @@ export class TimedPromptsCommand {
const totalPrompts = this.promptQueue.length;
// Calculate notification duration: slightly less than delay to avoid overlap
// For delays >1s, end 500ms before next tick
// For delays <=1s, use 900ms or delay-100ms (whichever is smaller)
// For delays >=1s, end 500ms before next tick
// For delays <1s, use 900ms or delay-100ms (whichever is smaller)
// Clamp to minimum 300ms to prevent flicker/invisible notices
const delayMs = Math.max(0, delaySeconds * 1000);
const notificationDuration =