diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-09-15 16:07:16 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-09-15 16:07:16 +0200 |
commit | 80c35a2053ad45dbdf4f05bb48273bfaf97474b0 (patch) | |
tree | c4943c80bab3bd4915f43aa706c4eef589236d33 /ui/src | |
parent | 601b58b6708ebda220fa6ae040c16f2406a7fc67 (diff) |
TunnelListFragment: set selection on Main, not Main.immediate
Otherwise, we crash when saving the config.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt | 2 |
1 files changed, 1 insertions, 1 deletions
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) |