Fix services search bar focusing issues

This commit is contained in:
Rafał Kobyłko 2024-08-12 00:15:06 +02:00
parent 2ac74348e7
commit 4f2e3319ab

View File

@ -152,11 +152,11 @@ private fun SearchBar(
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
AnimatedVisibility(visible = focused.not()) { AnimatedVisibility(visible = focused.not() && query.isEmpty()) {
TwImage(painter = painterResource(id = com.twofasapp.designsystem.R.drawable.logo_2fas), modifier = Modifier.size(24.dp)) TwImage(painter = painterResource(id = com.twofasapp.designsystem.R.drawable.logo_2fas), modifier = Modifier.size(24.dp))
} }
AnimatedVisibility(visible = focused) { AnimatedVisibility(visible = focused || query.isNotEmpty()) {
TwIcon(painter = TwIcons.Search, modifier = Modifier.size(24.dp)) TwIcon(painter = TwIcons.Search, modifier = Modifier.size(24.dp))
} }