From 8669ae78e13e6db4f0a9b88f42aab439da861bc9 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 7 Apr 2023 15:18:33 +0200 Subject: ui: set app list button text on main thread Hopefully will fix, "Only the original thread that creted a view hierarchy can touch its views." Reported-by: Damir <2k1dmg@gmail.com> Signed-off-by: Jason A. Donenfeld --- .../main/java/com/wireguard/android/fragment/AppListDialogFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/src/main') diff --git a/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt index 42cea1bc..531cf90d 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.kt @@ -63,8 +63,8 @@ class AppListDialogFragment : DialogFragment() { withContext(Dispatchers.Main.immediate) { appData.clear() appData.addAll(applicationData) + setButtonText() } - setButtonText() } catch (e: Throwable) { withContext(Dispatchers.Main.immediate) { val error = ErrorMessages[e] -- cgit v1.2.3