From c1567efe52b344dca7628b51b1b65d5a5fb5bb83 Mon Sep 17 00:00:00 2001 From: Fabian Zobrist Date: Sat, 21 Jan 2023 18:12:30 +0100 Subject: [PATCH] [#11] Close dropdown list first. the callback might restart the application on a settings change and keep the menu open. --- .../java/me/zobrist/tichucounter/ui/settings/SettingsView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/me/zobrist/tichucounter/ui/settings/SettingsView.kt b/app/src/main/java/me/zobrist/tichucounter/ui/settings/SettingsView.kt index fd86dc5..d6a05e9 100644 --- a/app/src/main/java/me/zobrist/tichucounter/ui/settings/SettingsView.kt +++ b/app/src/main/java/me/zobrist/tichucounter/ui/settings/SettingsView.kt @@ -136,8 +136,8 @@ fun StringSetting(name: String, map: Map, selected: T, onSelected: ( map.forEach { DropdownMenuItem( onClick = { - onSelected(it.key) expanded = false + onSelected(it.key) }, text = { Text(stringResource(it.value)) }, trailingIcon = {