Skip to content

Commit

Permalink
feat: delete game if it doesn't exist anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
goweiwen committed Jul 20, 2023
1 parent 815495f commit 84842fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion allium-launcher/src/view/entry_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,11 @@ where
MenuEntry::RemoveFromRecents => {
if let Some(Entry::Game(game)) = self.entries.get(self.list.selected())
{
self.res.get::<Database>().reset_game(&game.path)?;
if game.path.exists() {
self.res.get::<Database>().reset_game(&game.path)?;
} else {
self.res.get::<Database>().delete_game(&game.path)?;
}
self.load_entries()?;
commands.send(Command::Redraw).await?;
}
Expand Down

0 comments on commit 84842fa

Please sign in to comment.