From 48bfde63b80107d52a1c9de7a3cadb97e70f8e38 Mon Sep 17 00:00:00 2001 From: uykek Date: Mon, 31 Aug 2020 19:53:44 +0200 Subject: [PATCH] Fix bug that occurred when exiting from a daily sudoku using the back press button --- .../secuso/privacyfriendlysudoku/ui/DailySudokuActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/DailySudokuActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/DailySudokuActivity.java index bc5d695..c37dcaa 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/DailySudokuActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/DailySudokuActivity.java @@ -37,6 +37,7 @@ import android.view.View; import android.widget.RatingBar; import android.widget.Toast; import org.secuso.privacyfriendlysudoku.controller.GameController; +import org.secuso.privacyfriendlysudoku.controller.GameStateManager; import org.secuso.privacyfriendlysudoku.controller.NewLevelManager; import org.secuso.privacyfriendlysudoku.controller.database.DatabaseHelper; import org.secuso.privacyfriendlysudoku.controller.database.model.DailySudoku; @@ -184,6 +185,8 @@ public class DailySudokuActivity extends AppCompatActivity { if the 'finished for today' setting is 'false', the player has already started the sudoku but has yet to finish it -> send the designated daily sudoku ID to the GameActivity */ + GameStateManager fm = new GameStateManager(getBaseContext(), settings); + fm.loadGameStateInfo(); intent.putExtra("loadLevel", true); intent.putExtra("loadLevelID", GameController.DAILY_SUDOKU_ID); startActivity(intent);