Skip to content

Commit 3793da9

Browse files
committed
fix(ai-assistant): keep the composer recoverable after process death
Only fold it on a screen that still carries the reopen tab.
1 parent c24ca24 commit 3793da9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

ai-assistant/src/main/kotlin/com/itsaky/androidide/plugins/aiassistant/fragments/ComposerAutoHideController.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,14 @@ internal class ComposerAutoHideController(
134134
outState.putBoolean(KEY_COMPOSER_VISIBLE, _binding?.inputBarCard?.isVisible ?: true)
135135
}
136136

137-
/** Turns auto-hide on for short screens only, then settles the composer on [visible]. */
137+
/**
138+
* Turns auto-hide on for short screens only, then settles the composer on [visible]. A folded
139+
* composer is asked for, not obeyed: only a compact screen carries the tab that reopens it, so
140+
* a taller one always lands open however it was left.
141+
*/
138142
private fun applyCompactRule(config: Configuration, visible: Boolean) {
139143
autoHide = config.screenHeightDp < compactHeightDp
140-
setVisible(visible)
144+
setVisible(!autoHide || visible)
141145
}
142146

143147
/**

0 commit comments

Comments
 (0)