files: expand the paste bar when the clipboard fills
- Commit
43f7c2c5fac984118f43d6186406c8d2f4b3e358- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-05 16:25 UTC (11 hours ago)
- Parents
c65cfc0
The ready-to-paste bar mounted in a cut at the top of the listing. It now opens through ExpandVisibility in the listing column and closes up when the clipboard empties, selection starts, or search takes over. Wrap abrupt conditional content in the shared library.ui motion helpers so it expands/fades/pops in instead of popping in cut, and closes up cleanly when it goes away. No raw androidx.compose. animation is used at the call site, per the fatal DirectCompose Animation lint; durations and easing come from the helpers' MaterialTheme motion-scheme defaults. Verified in this worktree with lint, lintVitalRelease and testDevUnitTest for the module (details in the session report; any pre-existing failure was reproduced on the pristine base).
Diff
files/src/main/java/com/vayunmathur/files/ui/DirectoryListing.kt
diff --git a/files/src/main/java/com/vayunmathur/files/ui/DirectoryListing.kt b/files/src/main/java/com/vayunmathur/files/ui/DirectoryListing.ktindex 0fa855841d..294232fd73 100644--- a/files/src/main/java/com/vayunmathur/files/ui/DirectoryListing.kt+++ b/files/src/main/java/com/vayunmathur/files/ui/DirectoryListing.kt@@ -25,6 +25,7 @@ import com.vayunmathur.files.platform.searchMatches import com.vayunmathur.files.ui.components.DirectoryItem import com.vayunmathur.files.ui.components.GridItem import com.vayunmathur.library.ui.EmptyState+import com.vayunmathur.library.ui.ExpandVisibility import com.vayunmathur.library.ui.HorizontalDivider import com.vayunmathur.library.ui.IconButton import com.vayunmathur.library.ui.IconClose@@ -102,7 +103,9 @@ internal fun DirectoryListing( Column(modifier) { // Paste bar: shown when the clipboard has files and we can write here.- if (clipboardCount > 0 && canModifyHere && selectedPaths.isEmpty() && !isSearchActive) {+ ExpandVisibility(+ visible = clipboardCount > 0 && canModifyHere && selectedPaths.isEmpty() && !isSearchActive,+ ) { Surface(color = MaterialTheme.colorScheme.secondaryContainer) { Row( modifier = Modifier