mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Fixed multiple issues where the gamelists would not switch view styles after scraping.
This commit is contained in:
parent
43ad07b04d
commit
df28513bb0
|
@ -365,6 +365,13 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection
|
||||||
ViewController::get()->
|
ViewController::get()->
|
||||||
getGameListView(curSys).get()->remove(collectionEntry, false);
|
getGameListView(curSys).get()->remove(collectionEntry, false);
|
||||||
}
|
}
|
||||||
|
else if (name == "recent" && file->metadata.get("lastplayed") == "0") {
|
||||||
|
// If lastplayed is set to 0 it means the entry has been cleared, and the
|
||||||
|
// game should therefore be removed.
|
||||||
|
ViewController::get()->
|
||||||
|
getGameListView(curSys).get()->remove(collectionEntry, false);
|
||||||
|
ViewController::get()->onFileChanged(rootFolder, true);
|
||||||
|
}
|
||||||
else if (curSys->isCollection() && !file->getCountAsGame()) {
|
else if (curSys->isCollection() && !file->getCountAsGame()) {
|
||||||
// If the countasgame flag has been set to false, then remove the game.
|
// If the countasgame flag has been set to false, then remove the game.
|
||||||
if (curSys->isGroupedCustomCollection()) {
|
if (curSys->isGroupedCustomCollection()) {
|
||||||
|
@ -382,11 +389,10 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection
|
||||||
rootFolder->sort(rootFolder->getSortTypeFromString(
|
rootFolder->sort(rootFolder->getSortTypeFromString(
|
||||||
rootFolder->getSortTypeString()), mFavoritesSorting);
|
rootFolder->getSortTypeString()), mFavoritesSorting);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
// Re-index with new metadata.
|
// Re-index with new metadata.
|
||||||
fileIndex->addToIndex(collectionEntry);
|
fileIndex->addToIndex(collectionEntry);
|
||||||
ViewController::get()->onFileChanged(collectionEntry, false);
|
ViewController::get()->onFileChanged(collectionEntry, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -455,12 +461,12 @@ void CollectionSystemsManager::updateCollectionSystem(FileData* file, Collection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ViewController::get()->onFileChanged(rootFolder, false);
|
ViewController::get()->onFileChanged(rootFolder, true);
|
||||||
// For custom collections, update either the actual system or its parent depending
|
// For custom collections, update either the actual system or its parent depending
|
||||||
// on whether the collection is grouped or not.
|
// on whether the collection is grouped or not.
|
||||||
if (sysData.decl.isCustom) {
|
if (sysData.decl.isCustom) {
|
||||||
if (rootFolder->getSystem()->isGroupedCustomCollection())
|
if (rootFolder->getSystem()->isGroupedCustomCollection())
|
||||||
ViewController::get()->onFileChanged(rootFolder->getParent(), false);
|
ViewController::get()->onFileChanged(rootFolder->getParent(), true);
|
||||||
else
|
else
|
||||||
ViewController::get()->onFileChanged(rootFolder, false);
|
ViewController::get()->onFileChanged(rootFolder, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue