mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Android: Don't queue up multiple rescans before directory initialization
This commit is contained in:
parent
dbcdead04d
commit
cad4548b27
@ -80,6 +80,8 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
||||
{
|
||||
super.onResume();
|
||||
|
||||
boolean cacheAlreadyLoading = GameFileCacheService.isLoading();
|
||||
|
||||
if (DirectoryInitialization.shouldStart(this))
|
||||
{
|
||||
DirectoryInitialization.start(this);
|
||||
@ -93,14 +95,12 @@ public final class MainActivity extends AppCompatActivity implements MainView
|
||||
// such as system language, cover downloading...
|
||||
forEachPlatformGamesView(PlatformGamesView::refetchMetadata);
|
||||
|
||||
if (sShouldRescanLibrary)
|
||||
if (sShouldRescanLibrary && !cacheAlreadyLoading)
|
||||
{
|
||||
GameFileCacheService.startRescan(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
sShouldRescanLibrary = true;
|
||||
}
|
||||
|
||||
sShouldRescanLibrary = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -68,6 +68,8 @@ public final class TvMainActivity extends FragmentActivity implements MainView
|
||||
{
|
||||
super.onResume();
|
||||
|
||||
boolean cacheAlreadyLoading = GameFileCacheService.isLoading();
|
||||
|
||||
if (DirectoryInitialization.shouldStart(this))
|
||||
{
|
||||
DirectoryInitialization.start(this);
|
||||
@ -80,14 +82,12 @@ public final class TvMainActivity extends FragmentActivity implements MainView
|
||||
// such as system language, cover downloading...
|
||||
refetchMetadata();
|
||||
|
||||
if (sShouldRescanLibrary)
|
||||
if (sShouldRescanLibrary && !cacheAlreadyLoading)
|
||||
{
|
||||
GameFileCacheService.startRescan(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
sShouldRescanLibrary = true;
|
||||
}
|
||||
|
||||
sShouldRescanLibrary = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user