aboutsummaryrefslogtreecommitdiffstatshomepage
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
parentlibwg-go: update to go 1.15.2 (diff)
downloadwireguard-android-80c35a2053ad45dbdf4f05bb48273bfaf97474b0.tar.xz
wireguard-android-80c35a2053ad45dbdf4f05bb48273bfaf97474b0.zip
TunnelListFragment: set selection on Main, not Main.immediate
Otherwise, we crash when saving the config. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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 3250db6..db2fcd7 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)