diff options
Diffstat (limited to 'ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt b/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt index de1417dd..8d4c181c 100644 --- a/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/SettingsActivity.kt @@ -102,7 +102,7 @@ class SettingsActivity : ThemeChangeAwareActivity() { preferenceManager.findPreference<Preference>("multiple_tunnels") ).filterNotNull() wgQuickOnlyPrefs.forEach { it.isVisible = false } - lifecycleScope.launch(Dispatchers.Main.immediate) { + lifecycleScope.launch { if (Application.getBackend() is WgQuickBackend) { ++preferenceScreen.initialExpandedChildrenCount wgQuickOnlyPrefs.forEach { it.isVisible = true } @@ -121,7 +121,7 @@ class SettingsActivity : ThemeChangeAwareActivity() { moduleInstaller?.parent?.removePreference(moduleInstaller) } else { kernelModuleDisabler?.parent?.removePreference(kernelModuleDisabler) - lifecycleScope.launch(Dispatchers.Main.immediate) { + lifecycleScope.launch { try { withContext(Dispatchers.IO) { Application.getRootShell().start() } moduleInstaller?.isVisible = true |