diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bfc1ee..5d89ed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **The month view no longer crashes after going before 1900** in the day or week view ([#457]). - **Month pages keep updating.** After a small swipe that snapped back, a month page could stop showing new or edited events, and opening an event from the split view could show its old times ([#440], [#454]). - **Smoother expand and collapse in the split month view.** The day cells morph cleanly between the two layouts, and week numbers now animate along with them ([#473]). +- **Back clears the selected day in the split month view.** With a day picked, the back gesture used to close the app; it now goes back to the whole month's agenda first ([#142]). ## [2.23.1] — 2026-10-28 diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt index 3b194ea..2115f57 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/month/MonthScreen.kt @@ -1233,6 +1233,10 @@ private fun SplitMonthContent( ) { val reduceMotion = rememberReduceMotion() val haptics = LocalHapticFeedback.current + // Registered first so the expand handler below wins while the grid is open. + BackHandler(enabled = selected != null && !expanded) { + onClearSelection() + } BackHandler(enabled = expanded != initiallyExpanded) { onExpandedChange(initiallyExpanded) }