mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed an issue where a star was sometimes included in the quick selector when it shouldn't.
This commit is contained in:
parent
0845bcf840
commit
fc03134ef0
|
@ -956,6 +956,7 @@ void GamelistBase::generateFirstLetterIndex(const std::vector<FileData*>& files)
|
|||
bool onlyFavorites {true};
|
||||
bool onlyFolders {true};
|
||||
bool hasFavorites {false};
|
||||
bool hasFolderFavorites {false};
|
||||
bool hasFolders {false};
|
||||
bool favoritesSorting {false};
|
||||
|
||||
|
@ -980,7 +981,7 @@ void GamelistBase::generateFirstLetterIndex(const std::vector<FileData*>& files)
|
|||
for (auto it = files.begin(); it != files.end(); ++it) {
|
||||
if ((*it)->getType() == FOLDER && (*it)->getFavorite() && favoritesSorting &&
|
||||
!onlyFavorites) {
|
||||
hasFavorites = true;
|
||||
hasFolderFavorites = true;
|
||||
}
|
||||
else if ((*it)->getType() == FOLDER && foldersOnTop && !onlyFolders) {
|
||||
hasFolders = true;
|
||||
|
@ -1001,7 +1002,7 @@ void GamelistBase::generateFirstLetterIndex(const std::vector<FileData*>& files)
|
|||
|
||||
// If there are any favorites and/or folders in the list, insert their respective
|
||||
// Unicode characters at the beginning of the vector.
|
||||
if (hasFavorites)
|
||||
if (hasFavorites || (hasFolderFavorites && onlyFolders))
|
||||
mFirstLetterIndex.insert(mFirstLetterIndex.begin(), ViewController::FAVORITE_CHAR);
|
||||
|
||||
if (hasFolders)
|
||||
|
|
Loading…
Reference in a new issue