summaryrefslogtreecommitdiffhomepage
path: root/ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt13
1 files changed, 6 insertions, 7 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
index 6ddbb56d..b7912175 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
@@ -117,14 +117,13 @@ class TunnelEditorFragment : BaseFragment(), AppSelectionListener {
inputManager?.hideSoftInputFromWindow(focusedView.windowToken,
InputMethodManager.HIDE_NOT_ALWAYS)
}
+
// Tell the activity to finish itself or go back to the detail view.
- activity.runOnUiThread {
- // TODO(smaeul): Remove this hack when fixing the Config ViewModel
- // The selected tunnel has to actually change, but we have to remember this one.
- val savedTunnel = tunnel
- if (savedTunnel === selectedTunnel) selectedTunnel = null
- selectedTunnel = savedTunnel
- }
+ // TODO(smaeul): Remove this hack when fixing the Config ViewModel
+ // The selected tunnel has to actually change, but we have to remember this one.
+ val savedTunnel = tunnel
+ if (savedTunnel === selectedTunnel) selectedTunnel = null
+ selectedTunnel = savedTunnel
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {