diff --git a/android/src/main/java/com/tailscale/ipn/ui/view/Buttons.kt b/android/src/main/java/com/tailscale/ipn/ui/view/Buttons.kt index 271fa0b..d52b6e7 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/view/Buttons.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/view/Buttons.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Clear -import androidx.compose.material.icons.outlined.Close import androidx.compose.material3.Button import androidx.compose.material3.ButtonColors import androidx.compose.material3.ButtonDefaults @@ -20,7 +19,6 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.unit.dp import com.tailscale.ipn.ui.theme.ts_color_light_blue @@ -59,13 +57,3 @@ fun ClearButton(onClick: () -> Unit) { Icon(Icons.Outlined.Clear, null) } } - - -@Composable -fun CloseButton() { - val focusManager = LocalFocusManager.current - - IconButton(onClick = { focusManager.clearFocus() }, modifier = Modifier.size(24.dp)) { - Icon(Icons.Outlined.Close, null) - } -} diff --git a/android/src/main/java/com/tailscale/ipn/ui/view/MainView.kt b/android/src/main/java/com/tailscale/ipn/ui/view/MainView.kt index 79d7a7f..ed6bf0c 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/view/MainView.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/view/MainView.kt @@ -326,9 +326,7 @@ fun PeerList( onActiveChange = {}, shape = RoundedCornerShape(10.dp), leadingIcon = { Icon(Icons.Outlined.Search, null) }, - trailingIcon = { - if (searchTermStr.isNotEmpty()) ClearButton({ onSearch("") }) else CloseButton() - }, + trailingIcon = { if (searchTermStr.isNotEmpty()) ClearButton({ onSearch("") }) }, tonalElevation = 0.dp, shadowElevation = 0.dp, colors =