Skip to content

Commit

Permalink
Fix missed night mode updates
Browse files Browse the repository at this point in the history
Commit e84f586 was slightly too aggressive
about skipping this.
  • Loading branch information
chrisboyle committed May 21, 2022
1 parent f5da63c commit 57b82e7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions app/src/main/java/name/boyle/chris/sgtpuzzles/GamePlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -1439,16 +1439,14 @@ private void applyOrientation() {

@Override
public void refreshNightNow(final boolean isNight, final boolean alreadyStarted) {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.CREATED)) return;
gameView.night = isNight;
if (alreadyStarted) {
if (currentBackend != null) {
gameView.refreshColours(currentBackend, gameEngine.getColours());
gameView.clear();
gameViewResized(); // cheat - we just want a redraw
}
refreshStatusBarColours();
if (!alreadyStarted || !getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.CREATED)) return;
if (currentBackend != null) {
gameView.refreshColours(currentBackend, gameEngine.getColours());
gameView.clear();
gameViewResized(); // cheat - we just want a redraw
}
refreshStatusBarColours();
}

@Override
Expand Down

0 comments on commit 57b82e7

Please sign in to comment.