mirror of
https://github.com/joel16/VITA-Homebrew-Sorter.git
synced 2024-11-26 21:00:27 +00:00
gui: Save sort mode if sorting is done successfully and sort based on sort mode on start up
This commit is contained in:
parent
fd9e7d0ccb
commit
b26bb0f439
@ -171,8 +171,10 @@ namespace GUI {
|
||||
case StateConfirmSort:
|
||||
AppList::Backup();
|
||||
backupExists = true;
|
||||
if ((AppList::Save(entries.icons)) == 0)
|
||||
if ((AppList::Save(entries.icons)) == 0) {
|
||||
Config::Save(cfg);
|
||||
state = StateDone;
|
||||
}
|
||||
else
|
||||
state = StateError;
|
||||
break;
|
||||
@ -599,7 +601,11 @@ namespace GUI {
|
||||
AppEntries entries;
|
||||
std::vector<SceIoDirent> loadouts;
|
||||
|
||||
// Initial sort based on cfg.sort_mode
|
||||
AppList::Get(entries);
|
||||
std::sort(entries.icons.begin(), entries.icons.end(), cfg.sort_mode == SortAsc? AppList::SortAppDesc : AppList::SortAppDesc);
|
||||
std::sort(entries.child_apps.begin(), entries.child_apps.end(), cfg.sort_mode == SortAsc? AppList::SortChildAppDesc : AppList::SortChildAppDesc);
|
||||
|
||||
FS::GetDirList("ux0:data/VITAHomebrewSorter/loadouts", loadouts);
|
||||
|
||||
int date_format = Utils::GetDateFormat();
|
||||
|
Loading…
Reference in New Issue
Block a user