diff --git a/CHANGELOG.md b/CHANGELOG.md index 73a6fc1f1..051d2cdc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated holiday data ### Fixed +- Fixed the save-event countdown to show time until the event instead of time until the reminder ([#1073]) - Fixed event text readability on colored backgrounds ([#1065]) - Fixed invisible current time indicator in weekly view ([#99]) - Fixed stuck zoom level in weekly view on some devices ([#621]) @@ -252,6 +253,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.10.3...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) }