summaryrefslogtreecommitdiffhomepage
path: root/ui/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-09-15 16:07:16 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-09-15 16:07:16 +0200
commit80c35a2053ad45dbdf4f05bb48273bfaf97474b0 (patch)
treec4943c80bab3bd4915f43aa706c4eef589236d33 /ui/src
parent601b58b6708ebda220fa6ae040c16f2406a7fc67 (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.kt2
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)