From 80c35a2053ad45dbdf4f05bb48273bfaf97474b0 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 15 Sep 2020 16:07:16 +0200 Subject: TunnelListFragment: set selection on Main, not Main.immediate Otherwise, we crash when saving the config. Signed-off-by: Jason A. Donenfeld --- ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/src/main/java/com') diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt index 3250db65..db2fcd77 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt @@ -221,7 +221,7 @@ class TunnelListFragment : BaseFragment() { override fun onSelectedTunnelChanged(oldTunnel: ObservableTunnel?, newTunnel: ObservableTunnel?) { binding ?: return - GlobalScope.launch(Dispatchers.Main.immediate) { + GlobalScope.launch(Dispatchers.Main) { val tunnels = Application.getTunnelManager().getTunnels() if (newTunnel != null) viewForTunnel(newTunnel, tunnels).setSingleSelected(true) if (oldTunnel != null) viewForTunnel(oldTunnel, tunnels).setSingleSelected(false) -- cgit v1.2.3