Merge pull request #10589 from JosJuice/android-more-init-checks
Android: Use AfterDirectoryInitializationRunner more comprehensively
This commit is contained in:
commit
3ed9d5a3c7
|
@ -26,6 +26,7 @@ import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner;
|
|||
import org.dolphinemu.dolphinemu.utils.BooleanSupplier;
|
||||
import org.dolphinemu.dolphinemu.utils.CompletableFuture;
|
||||
import org.dolphinemu.dolphinemu.utils.ContentHandler;
|
||||
import org.dolphinemu.dolphinemu.utils.DirectoryInitialization;
|
||||
import org.dolphinemu.dolphinemu.utils.FileBrowserHelper;
|
||||
import org.dolphinemu.dolphinemu.utils.ThreadUtil;
|
||||
import org.dolphinemu.dolphinemu.utils.WiiUtils;
|
||||
|
@ -92,7 +93,8 @@ public final class MainPresenter
|
|||
return true;
|
||||
|
||||
case R.id.button_add_directory:
|
||||
mView.launchFileListActivity();
|
||||
new AfterDirectoryInitializationRunner().runWithLifecycle(activity, true,
|
||||
mView::launchFileListActivity);
|
||||
return true;
|
||||
|
||||
case R.id.menu_open_file:
|
||||
|
@ -104,7 +106,8 @@ public final class MainPresenter
|
|||
return true;
|
||||
|
||||
case R.id.menu_online_system_update:
|
||||
launchOnlineUpdate();
|
||||
new AfterDirectoryInitializationRunner().runWithLifecycle(activity, true,
|
||||
this::launchOnlineUpdate);
|
||||
return true;
|
||||
|
||||
case R.id.menu_install_wad:
|
||||
|
@ -310,18 +313,20 @@ public final class MainPresenter
|
|||
|
||||
private void launchWiiSystemMenu()
|
||||
{
|
||||
WiiUtils.isSystemMenuInstalled();
|
||||
|
||||
if (WiiUtils.isSystemMenuInstalled())
|
||||
{
|
||||
EmulationActivity.launchSystemMenu(mActivity);
|
||||
}
|
||||
else
|
||||
{
|
||||
SystemMenuNotInstalledDialogFragment dialogFragment =
|
||||
new SystemMenuNotInstalledDialogFragment();
|
||||
dialogFragment
|
||||
.show(mActivity.getSupportFragmentManager(), "SystemMenuNotInstalledDialogFragment");
|
||||
new AfterDirectoryInitializationRunner().runWithLifecycle(mActivity, true, () ->
|
||||
{
|
||||
SystemMenuNotInstalledDialogFragment dialogFragment =
|
||||
new SystemMenuNotInstalledDialogFragment();
|
||||
dialogFragment
|
||||
.show(mActivity.getSupportFragmentManager(),
|
||||
"SystemMenuNotInstalledDialogFragment");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue