diff --git a/CHANGELOG.md b/CHANGELOG.md index bb1440fd9..5d27d5144 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fixed the save-event countdown to show time until the event instead of time until the reminder ([#1073]) ## [1.11.0] - 2026-09-23 ### Added @@ -262,6 +264,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#1019]: https://github.com/FossifyOrg/Calendar/issues/1019 [#1024]: https://github.com/FossifyOrg/Calendar/issues/1024 [#1065]: https://github.com/FossifyOrg/Calendar/issues/1065 +[#1073]: https://github.com/FossifyOrg/Calendar/issues/1073 [#1157]: https://github.com/FossifyOrg/Calendar/issues/1157 [Unreleased]: https://github.com/FossifyOrg/Calendar/compare/1.11.0...HEAD diff --git a/app/src/main/kotlin/org/fossify/calendar/extensions/Context.kt b/app/src/main/kotlin/org/fossify/calendar/extensions/Context.kt index f9dd6af1e..a2cd3b217 100644 --- a/app/src/main/kotlin/org/fossify/calendar/extensions/Context.kt +++ b/app/src/main/kotlin/org/fossify/calendar/extensions/Context.kt @@ -243,10 +243,10 @@ fun Context.scheduleEventIn(notifyAtMillis: Long, event: Event, showToasts: Bool val newNotifyAtMillis = notifyAtMillis + 1000 if (showToasts) { - val secondsTillNotification = (newNotifyAtMillis - now) / 1000 + val secondsTillEvent = event.getEventStartTS() - getNowSeconds() val msg = String.format( getString(org.fossify.commons.R.string.time_remaining), - formatSecondsToTimeString(secondsTillNotification.toInt()) + formatSecondsToTimeString(secondsTillEvent.toInt()) ) toast(msg) }