TunnelListFragment: set selection on Main, not Main.immediate
Otherwise, we crash when saving the config. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
601b58b670
commit
80c35a2053
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user