diff options
| author | JosJuice <josjuice@gmail.com> | 2018-06-01 18:17:51 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2018-06-01 18:17:51 +0200 |
| commit | 1b127bdf33845a1f82479180b497fb7cf5baa4c7 (patch) | |
| tree | a9a47d13685eb28766dea345b1ace2e39431ab06 /Source/Android/app/src/main/java | |
| parent | 816c80c99299e8f4181f321b1530b44a31268dfe (diff) | |
Android: Refresh all fragments, not just the selected one
This fixes the oddity of having to manually refresh after adding a
folder that contains games for a different tab than the one you're on.
Diffstat (limited to 'Source/Android/app/src/main/java')
| -rw-r--r-- | Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java index 848ab7dc95..97ad22bd7a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java @@ -110,7 +110,7 @@ public final class MainActivity extends AppCompatActivity implements MainView public void refresh() { getContentResolver().insert(GameProvider.URI_REFRESH, null); - refreshFragment(); + refreshAllFragments(); } @Override @@ -203,14 +203,15 @@ public final class MainActivity extends AppCompatActivity implements MainView return mPresenter.handleOptionSelection(item.getItemId()); } - private void refreshFragment() + private void refreshAllFragments() { - - Platform platform = Platform.fromPosition(mViewPager.getCurrentItem()); - PlatformGamesView fragment = getPlatformGamesView(platform); - if (fragment != null) + for (Platform platform : Platform.values()) { - fragment.refresh(); + PlatformGamesView fragment = getPlatformGamesView(platform); + if (fragment != null) + { + fragment.refresh(); + } } } |
