Android: Improve checking in MainPresenter.launchWiiSystemMenu

Not only SystemMenuNotInstalledDialogFragment requires directory
initialization to have completed, but also isSystemMenuInstalled.
This commit is contained in:
JosJuice 2022-09-25 22:15:15 +02:00
parent 199d2be939
commit 2c216c9a2b

View File

@ -317,20 +317,20 @@ public final class MainPresenter
private void launchWiiSystemMenu()
{
if (WiiUtils.isSystemMenuInstalled())
new AfterDirectoryInitializationRunner().runWithLifecycle(mActivity, () ->
{
EmulationActivity.launchSystemMenu(mActivity);
}
else
{
new AfterDirectoryInitializationRunner().runWithLifecycle(mActivity, () ->
if (WiiUtils.isSystemMenuInstalled())
{
EmulationActivity.launchSystemMenu(mActivity);
}
else
{
SystemMenuNotInstalledDialogFragment dialogFragment =
new SystemMenuNotInstalledDialogFragment();
dialogFragment
.show(mActivity.getSupportFragmentManager(),
"SystemMenuNotInstalledDialogFragment");
});
}
}
});
}
}