fix: When saving a new game and favorites view is selected the game is marked as favorite directly

This commit is contained in:
lantzelot-swe 2021-03-13 18:13:26 +01:00
parent 1decf941fe
commit 410b754ace
1 changed files with 5 additions and 0 deletions

View File

@ -384,6 +384,11 @@ public class MainViewModel extends AbstractModel
int rowId = dbConnector.createNewGame(updatedGame);
currentGameId = Integer.toString(rowId);
selectedData.setGameId(currentGameId);
if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_ID)
{
//Mark as favorites
toggleFavorite(selectedData);
}
}
else
{