From 706864b3b227631fa9aadbe549235931d2570345 Mon Sep 17 00:00:00 2001 From: Apex077 <143308884+Apex077@users.noreply.github.com> Date: Fri, 24 Jul 2026 23:41:38 +0530 Subject: [PATCH] fix(eyecare): reflect configurable break duration in notification message (#92) Fixes #63 --- eyecare/plugin.toml | 2 +- eyecare/service.luau | 5 +++-- eyecare/translations/en.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eyecare/plugin.toml b/eyecare/plugin.toml index 9130670..4b9ce71 100644 --- a/eyecare/plugin.toml +++ b/eyecare/plugin.toml @@ -1,6 +1,6 @@ id = "apex077/eyecare" name = "Eye-Care Reminders" -version = "1.0.0" +version = "1.0.1" plugin_api = 3 author = "Apex077" license = "MIT" diff --git a/eyecare/service.luau b/eyecare/service.luau index f5cf4ee..7ed0da4 100644 --- a/eyecare/service.luau +++ b/eyecare/service.luau @@ -24,6 +24,7 @@ local settings = getSettings() function onConfigChanged() settings = getSettings() noctalia.log("eyecare: settings updated") + updateState() end -- Play a notification sound using system players @@ -119,7 +120,7 @@ function update() if settings.enable_notifications then noctalia.notify( noctalia.tr("notifications.eyecare-break-title"), - noctalia.tr("notifications.eyecare-break-body") + noctalia.tr("notifications.eyecare-break-body", { seconds = settings.break_duration_seconds }) ) end if settings.enable_sound then @@ -142,7 +143,7 @@ local function triggerBreak() if settings.enable_notifications then noctalia.notify( noctalia.tr("notifications.eyecare-break-title"), - noctalia.tr("notifications.eyecare-break-body") + noctalia.tr("notifications.eyecare-break-body", { seconds = settings.break_duration_seconds }) ) end if settings.enable_sound then diff --git a/eyecare/translations/en.json b/eyecare/translations/en.json index c6a6bad..73a1aee 100644 --- a/eyecare/translations/en.json +++ b/eyecare/translations/en.json @@ -1,6 +1,6 @@ { "notifications": { - "eyecare-break-body": "Focus on an object 20 feet away for 20 seconds.", + "eyecare-break-body": "Focus on an object 20 feet away for {seconds} seconds.", "eyecare-break-finished-body": "Your eyes are rested. You can return to your screen.", "eyecare-break-finished-title": "Break finished", "eyecare-break-title": "Time for a break"