From cfe80ff3e5ee7d1213ae47a51d104170d8df87f4 Mon Sep 17 00:00:00 2001 From: acress1 <134766617+acress1@users.noreply.github.com> Date: Fri, 14 Jun 2024 09:45:35 +0000 Subject: [PATCH] alarm displayed within 12hours instead of 15min --- .../ui/launcher/widgets/clock/parts/AlarmPartProvider.kt | 2 +- docs/docs/user-guide/widgets/clock.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/AlarmPartProvider.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/AlarmPartProvider.kt index 7357d992..137af117 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/AlarmPartProvider.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/widgets/clock/parts/AlarmPartProvider.kt @@ -43,7 +43,7 @@ class AlarmPartProvider : PartProvider { send(0) } else { time.collectLatest { - if (alarm > it + 15 * 60 * 1000) { + if (alarm > it + 12 * 60 * 60 * 1000) { send(0) } else { send(60) diff --git a/docs/docs/user-guide/widgets/clock.md b/docs/docs/user-guide/widgets/clock.md index 1413728d..752b4854 100644 --- a/docs/docs/user-guide/widgets/clock.md +++ b/docs/docs/user-guide/widgets/clock.md @@ -32,5 +32,5 @@ Base components, you can only enable one of them at a time: Additionally, these conditional components are available: - **Media**: show media controls, only when there are active media sessions -- **Alarm**: show the remaining time to the next alarm, only if there is an alarm scheduled to ring within the next 15 minutes +- **Alarm**: show the remaining time to the next alarm, only if there is an alarm scheduled to ring within the next 12 hours - **Battery**: shows the current battery level and remaining charging time, only if battery is charging or battery level is less than 15%