From 4f2e3319ab8a3f0355237f2b609dcfa4d9a7c357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=C2=A0Koby=C5=82ko?= Date: Mon, 12 Aug 2024 00:15:06 +0200 Subject: [PATCH] Fix services search bar focusing issues --- .../feature/home/ui/services/component/ServicesAppBar.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/component/ServicesAppBar.kt b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/component/ServicesAppBar.kt index 955ae206..43bcce55 100644 --- a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/component/ServicesAppBar.kt +++ b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/component/ServicesAppBar.kt @@ -152,11 +152,11 @@ private fun SearchBar( 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)) } - AnimatedVisibility(visible = focused) { + AnimatedVisibility(visible = focused || query.isNotEmpty()) { TwIcon(painter = TwIcons.Search, modifier = Modifier.size(24.dp)) }