Fix bug in GameActivity that caused timer to run even when it shouldn't

This commit is contained in:
uykek 2020-08-31 20:30:16 +02:00
parent 48bfde63b8
commit 2646831851

View file

@ -115,7 +115,7 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
protected void onPostCreate(Bundle savedInstanceState) { protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState); super.onPostCreate(savedInstanceState);
if(gameSolved) { if(gameSolved || !startGame) {
gameController.pauseTimer(); gameController.pauseTimer();
} else { } else {
// start the game // start the game
@ -412,7 +412,7 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
gameController.initTimer(); gameController.initTimer();
if(!gameSolved) { if(!gameSolved && startGame) {
mHandler.postDelayed(new Runnable() { mHandler.postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {