mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-18 19:19:33 +01:00
remove add width ratio
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
4f8584bc75
commit
f0cbe5113f
@ -89,8 +89,7 @@ fun AppBar(
|
||||
onUpdateSearchQuery(searchQuery)
|
||||
onUpdateAutocompleteUsers()
|
||||
},
|
||||
onDisableSearch = onDisableSearch,
|
||||
isAddParticipants = isAddParticipants
|
||||
onDisableSearch = onDisableSearch
|
||||
)
|
||||
|
||||
if (isAddParticipants) {
|
||||
|
@ -38,17 +38,12 @@ fun SearchComponent(
|
||||
text: String,
|
||||
onTextChange: (String) -> Unit,
|
||||
onDisableSearch: () -> Unit,
|
||||
isAddParticipants: Boolean
|
||||
) {
|
||||
var widthRatio = SearchComponentCompanionClass.WIDTH_RATI0_SMALL
|
||||
if (!isAddParticipants) {
|
||||
widthRatio = SearchComponentCompanionClass.WIDTH_RATIO_LARGE
|
||||
}
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
TextField(
|
||||
modifier = Modifier
|
||||
.background(MaterialTheme.colorScheme.background)
|
||||
.fillMaxWidth(widthRatio)
|
||||
.fillMaxWidth()
|
||||
.height(60.dp),
|
||||
value = text,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user