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)
This commit is contained in:
parent
ac40dab71d
commit
22e32c13dc
1 changed files with 2 additions and 1 deletions
|
@ -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<GameInfoContainer> 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 {
|
||||
|
|
Loading…
Reference in a new issue