From 748bda79aa266cba9c17765abb117ffc8061c5f4 Mon Sep 17 00:00:00 2001 From: Akatsuki Levi Date: Wed, 13 Mar 2024 22:13:41 -0300 Subject: [PATCH] fix: Fixed some favorite entries disappearing when show folders is off --- src/suyu/game_list.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/suyu/game_list.cpp b/src/suyu/game_list.cpp index f6f42d2ffe..b12cdb7bf9 100644 --- a/src/suyu/game_list.cpp +++ b/src/suyu/game_list.cpp @@ -501,6 +501,7 @@ void GameList::DonePopulating(const QStringList& watch_list) { if (!watch_dirs.isEmpty()) { watcher->removePaths(watch_dirs); } + // Workaround: Add the watch paths in chunks to allow the gui to refresh // This prevents the UI from stalling when a large number of watch paths are added // Also artificially caps the watcher to a certain number of directories @@ -923,7 +924,7 @@ void GameList::AddFavorite(u64 program_id) { } return; } else { - for (int i = 1; i < item_model->rowCount() - 1; i++) { + for (int i = 0; i < item_model->rowCount(); i++) { const auto* game = item_model->item(i); if (game->data(GameListItemPath::ProgramIdRole).toULongLong() != program_id) { continue;