diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e0ee08..237e200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,7 +62,8 @@ All notable changes to this project are documented here. The format follows ### Fixed - Closing the keyboard with the back gesture no longer leaves the task lists squeezed into the top half of the screen, as if the keyboard were still open, - until it was opened again (#177). + until it was opened again. The editor, task details and pickers kept the same + keyboard-sized gap at the bottom (#177). ## [1.3.2] - 2026-11-13 diff --git a/app/src/androidTest/java/de/jeanlucmakiola/agendula/ui/ImeInsetsResyncTest.kt b/app/src/androidTest/java/de/jeanlucmakiola/agendula/ui/ImeInsetsResyncTest.kt index 2583b00..1e9f3aa 100644 --- a/app/src/androidTest/java/de/jeanlucmakiola/agendula/ui/ImeInsetsResyncTest.kt +++ b/app/src/androidTest/java/de/jeanlucmakiola/agendula/ui/ImeInsetsResyncTest.kt @@ -1,7 +1,6 @@ package de.jeanlucmakiola.agendula.ui import android.graphics.Insets -import android.view.View import android.view.WindowInsets import android.view.WindowInsetsAnimation import androidx.activity.ComponentActivity @@ -9,7 +8,6 @@ import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.WindowInsets as ComposeInsets import androidx.compose.foundation.layout.ime import androidx.compose.ui.platform.LocalDensity -import androidx.compose.ui.platform.LocalView import androidx.compose.ui.test.junit4.v2.createAndroidComposeRule import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SdkSuppress @@ -32,7 +30,6 @@ class ImeInsetsResyncTest { @Volatile private var imeBottom = -1 - private lateinit var view: View @Test fun keyboardInsetsSettleAfterUserDrivenAnimation() { @@ -46,15 +43,14 @@ class ImeInsetsResyncTest { fun withoutResyncKeyboardInsetsStayStale() { setContent(resync = false) runUserDrivenKeyboardAnimation() - rule.waitForIdle() - assertThat(imeBottom).isEqualTo(KEYBOARD_PX) + val settled = runCatching { rule.waitUntil(TIMEOUT_MS) { imeBottom != KEYBOARD_PX } }.isSuccess + assertThat(settled).isFalse() } private fun setContent(resync: Boolean) { rule.runOnUiThread { rule.activity.enableEdgeToEdge() } rule.setContent { if (resync) ImeInsetsResync() - view = LocalView.current imeBottom = ComposeInsets.ime.getBottom(LocalDensity.current) } rule.waitForIdle() @@ -65,7 +61,7 @@ class ImeInsetsResyncTest { val animation = WindowInsetsAnimation(ime, null, -1) val keyboard = Insets.of(0, 0, 0, KEYBOARD_PX) rule.runOnUiThread { - val root = view.rootView + val root = rule.activity.window.decorView val midway = WindowInsets.Builder().setInsets(ime, keyboard).setVisible(ime, true).build() root.dispatchWindowInsetsAnimationPrepare(animation) root.dispatchWindowInsetsAnimationStart(animation, WindowInsetsAnimation.Bounds(Insets.NONE, keyboard)) @@ -73,7 +69,7 @@ class ImeInsetsResyncTest { } rule.waitForIdle() assertThat(imeBottom).isEqualTo(KEYBOARD_PX) - rule.runOnUiThread { view.rootView.dispatchWindowInsetsAnimationEnd(animation) } + rule.runOnUiThread { rule.activity.window.decorView.dispatchWindowInsetsAnimationEnd(animation) } rule.waitForIdle() } diff --git a/floret-kit b/floret-kit index b4cda7f..1b41628 160000 --- a/floret-kit +++ b/floret-kit @@ -1 +1 @@ -Subproject commit b4cda7f441290f6a8a38f20f7f173059e9973055 +Subproject commit 1b41628a4d7e73e42a68a3c8aabdc82ffff7507a