fix: attachment menu floats above pills instead of pushing them up
Moved AttachmentMenu out of the bottom dock Column into its own floating overlay positioned above the dock with padding(bottom=140dp). Pills and input stay in place, menu hovers over them.
This commit is contained in:
parent
5fbeded849
commit
43b2a72c96
1 changed files with 17 additions and 11 deletions
|
|
@ -540,17 +540,6 @@ fun ChatScreen(
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(10.dp))
|
Spacer(Modifier.height(10.dp))
|
||||||
androidx.compose.animation.AnimatedVisibility(
|
|
||||||
visible = showAttachMenu,
|
|
||||||
enter = androidx.compose.animation.fadeIn() + androidx.compose.animation.slideInVertically { it / 2 },
|
|
||||||
exit = androidx.compose.animation.fadeOut() + androidx.compose.animation.slideOutVertically { it / 2 },
|
|
||||||
) {
|
|
||||||
AttachmentMenu(
|
|
||||||
onCamera = { showAttachMenu = false; cameraPicker.launch(null) },
|
|
||||||
onGallery = { showAttachMenu = false; filePicker.launch("image/*") },
|
|
||||||
onFile = { showAttachMenu = false; filePicker.launch("*/*") },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
ChatInput(
|
ChatInput(
|
||||||
value = input,
|
value = input,
|
||||||
onValueChange = { input = it },
|
onValueChange = { input = it },
|
||||||
|
|
@ -563,6 +552,23 @@ fun ChatScreen(
|
||||||
Spacer(Modifier.height(16.dp))
|
Spacer(Modifier.height(16.dp))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Attachment menu — floats above the bottom dock
|
||||||
|
androidx.compose.animation.AnimatedVisibility(
|
||||||
|
visible = showAttachMenu,
|
||||||
|
modifier = Modifier
|
||||||
|
.align(Alignment.BottomCenter)
|
||||||
|
.padding(bottom = 140.dp)
|
||||||
|
.then(if (isTablet) Modifier.widthIn(max = 720.dp) else Modifier),
|
||||||
|
enter = androidx.compose.animation.fadeIn() + androidx.compose.animation.slideInVertically { it / 2 },
|
||||||
|
exit = androidx.compose.animation.fadeOut() + androidx.compose.animation.slideOutVertically { it / 2 },
|
||||||
|
) {
|
||||||
|
AttachmentMenu(
|
||||||
|
onCamera = { showAttachMenu = false; cameraPicker.launch(null) },
|
||||||
|
onGallery = { showAttachMenu = false; filePicker.launch("image/*") },
|
||||||
|
onFile = { showAttachMenu = false; filePicker.launch("*/*") },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// Model picker (bottom sheet), opened by the top pill
|
// Model picker (bottom sheet), opened by the top pill
|
||||||
if (showModelSheet) {
|
if (showModelSheet) {
|
||||||
ModelSheet(
|
ModelSheet(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue