mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 01:03:09 +00:00
Cap removed games cache at 200 entries
This commit is contained in:
parent
8e2fedccfb
commit
24400ca5e1
1 changed files with 3 additions and 1 deletions
|
|
@ -1414,7 +1414,9 @@ void App::removeGame(Game *game)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store in removed games map for potential undo
|
if (m_removedGames.size() >= 200) {
|
||||||
|
m_removedGames.clear();
|
||||||
|
}
|
||||||
m_removedGames[game->id()] = game->toJson();
|
m_removedGames[game->id()] = game->toJson();
|
||||||
|
|
||||||
m_gameModel->removeGame(game->id());
|
m_gameModel->removeGame(game->id());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue