diff options
| author | JosJuice <josjuice@gmail.com> | 2022-07-29 16:20:34 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2022-07-29 16:20:34 +0200 |
| commit | bab327eafa57c9ba5f6254103b42eaf963d44d35 (patch) | |
| tree | fa577c5e78ee957282d4a1b839618beecfc0dc45 /Source/Android/app/src/main/java | |
| parent | e10d66270f0394ff30803fa3474188cfdf08b11a (diff) | |
Android: Use AfterDirectoryInitializationRunner on FAB press
Without this, if the user finishes selecting a directory before
directory initialization finishes, MainPresenter.onDirectorySelected
will segfault when trying to read the MAIN_RECURSIVE_ISO_PATHS setting.
An alternative would be to use AfterDirectoryInitializationRunner
after the user selects the directory instead of before, but it might
be confusing for the user to deal with the usage statistics prompt
when they were expecting to add a folder.
Diffstat (limited to 'Source/Android/app/src/main/java')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainPresenter.java | 4 |
1 files changed, 2 insertions, 2 deletions
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 ca57cde56f..32d40234fe 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,7 +26,6 @@ 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; @@ -76,7 +75,8 @@ public final class MainPresenter public void onFabClick() { - mView.launchFileListActivity(); + new AfterDirectoryInitializationRunner().runWithLifecycle(mActivity, true, + mView::launchFileListActivity); } public boolean handleOptionSelection(int itemId, ComponentActivity activity) |
