mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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.
This commit is contained in:
@ -110,7 +110,7 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||||||
public void refresh()
|
public void refresh()
|
||||||
{
|
{
|
||||||
getContentResolver().insert(GameProvider.URI_REFRESH, null);
|
getContentResolver().insert(GameProvider.URI_REFRESH, null);
|
||||||
refreshFragment();
|
refreshAllFragments();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -203,14 +203,15 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
|||||||
return mPresenter.handleOptionSelection(item.getItemId());
|
return mPresenter.handleOptionSelection(item.getItemId());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshFragment()
|
private void refreshAllFragments()
|
||||||
{
|
{
|
||||||
|
for (Platform platform : Platform.values())
|
||||||
Platform platform = Platform.fromPosition(mViewPager.getCurrentItem());
|
|
||||||
PlatformGamesView fragment = getPlatformGamesView(platform);
|
|
||||||
if (fragment != null)
|
|
||||||
{
|
{
|
||||||
fragment.refresh();
|
PlatformGamesView fragment = getPlatformGamesView(platform);
|
||||||
|
if (fragment != null)
|
||||||
|
{
|
||||||
|
fragment.refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user