mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +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)
|
onUpdateSearchQuery(searchQuery)
|
||||||
onUpdateAutocompleteUsers()
|
onUpdateAutocompleteUsers()
|
||||||
},
|
},
|
||||||
onDisableSearch = onDisableSearch,
|
onDisableSearch = onDisableSearch
|
||||||
isAddParticipants = isAddParticipants
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (isAddParticipants) {
|
if (isAddParticipants) {
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user