Merge pull request #351 from pjft/fix-first-favorite

Fixing first favorites not updating index
This commit is contained in:
Jools Wills 2018-01-21 11:22:41 +00:00 committed by GitHub
commit 96a0fa3a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -491,6 +491,7 @@ bool CollectionSystemManager::toggleGameInCollection(FileData* file)
}
else
{
file->getSourceFileData()->getSystem()->getIndex()->removeFromIndex(file);
MetaDataList* md = &file->getSourceFileData()->metadata;
std::string value = md->get("favorite");
if (value == "false")
@ -502,6 +503,7 @@ bool CollectionSystemManager::toggleGameInCollection(FileData* file)
adding = false;
md->set("favorite", "false");
}
file->getSourceFileData()->getSystem()->getIndex()->addToIndex(file);
refreshCollectionSystems(file->getSourceFileData());
}
if (adding)