remove add width ratio

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-05-28 22:10:49 +02:00 committed by Marcel Hibbe
parent 4f8584bc75
commit f0cbe5113f
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 2 additions and 14 deletions

View File

@ -89,8 +89,7 @@ fun AppBar(
onUpdateSearchQuery(searchQuery) onUpdateSearchQuery(searchQuery)
onUpdateAutocompleteUsers() onUpdateAutocompleteUsers()
}, },
onDisableSearch = onDisableSearch, onDisableSearch = onDisableSearch
isAddParticipants = isAddParticipants
) )
if (isAddParticipants) { if (isAddParticipants) {

View File

@ -38,17 +38,12 @@ fun SearchComponent(
text: String, text: String,
onTextChange: (String) -> Unit, onTextChange: (String) -> Unit,
onDisableSearch: () -> Unit, onDisableSearch: () -> Unit,
isAddParticipants: Boolean
) { ) {
var widthRatio = SearchComponentCompanionClass.WIDTH_RATI0_SMALL
if (!isAddParticipants) {
widthRatio = SearchComponentCompanionClass.WIDTH_RATIO_LARGE
}
val keyboardController = LocalSoftwareKeyboardController.current val keyboardController = LocalSoftwareKeyboardController.current
TextField( TextField(
modifier = Modifier modifier = Modifier
.background(MaterialTheme.colorScheme.background) .background(MaterialTheme.colorScheme.background)
.fillMaxWidth(widthRatio) .fillMaxWidth()
.height(60.dp), .height(60.dp),
value = text, value = text,
onValueChange = { onTextChange(it) }, onValueChange = { onTextChange(it) },
@ -110,9 +105,3 @@ fun searchKeyboardActions(text: String, keyboardController: SoftwareKeyboardCont
} }
) )
class SearchComponentCompanionClass {
companion object {
const val WIDTH_RATI0_SMALL = 0.85f
const val WIDTH_RATIO_LARGE = 1.0f
}
}