From 22e32c13dc3ee401013975867d8a8d6da54b7b6d Mon Sep 17 00:00:00 2001 From: uykek Date: Tue, 18 Aug 2020 16:58:01 +0200 Subject: [PATCH] Fix bug that caused "continue" button in MainActivity to be enabled as long as there is a dailysudoku saved to the device of the user (even if there are no regular sudokus to continue) --- .../java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java index d8c8e24..bddaced 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java @@ -56,6 +56,7 @@ import android.widget.RatingBar; import android.widget.TextView; 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.helper.GameInfoContainer; @@ -312,7 +313,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig Button continueButton = (Button)findViewById(R.id.continueButton); GameStateManager fm = new GameStateManager(getBaseContext(), settings); List gic = fm.loadGameStateInfo(); - if(gic.size() > 0) { + if(gic.size() > 0 && !(gic.size() == 1 && gic.get(0).getID() == GameController.DAILY_SUDOKU_ID)) { continueButton.setEnabled(true); continueButton.setBackgroundResource(R.drawable.standalone_button); } else {