diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java index ecc69fbaf1..52423c3da4 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java @@ -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"); + }); } } }