Fix bug in GameActivity that caused timer to run even when it shouldn't
This commit is contained in:
parent
48bfde63b8
commit
2646831851
1 changed files with 2 additions and 2 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue