Use viewTreeLifecycleOwner

This commit is contained in:
Mygod
2020-06-01 16:21:49 -04:00
parent fb5283e61a
commit 379c3b226f
7 changed files with 12 additions and 11 deletions

View File

@@ -161,7 +161,7 @@ class TetheringFragment : Fragment(), ServiceConnection, Toolbar.OnMenuItemClick
true
}
R.id.configuration_repeater -> {
lifecycleScope.launchWhenCreated {
viewLifecycleOwner.lifecycleScope.launchWhenCreated {
adapter.repeaterManager.getConfiguration()?.let { config ->
WifiApDialogFragment().withArg(WifiApDialogFragment.Arg(config, p2pMode = true)).show(
this@TetheringFragment, CONFIGURE_REPEATER)