From 57b82e721df99a8c60531f9d05f4a2243ac663f7 Mon Sep 17 00:00:00 2001 From: Chris Boyle Date: Sat, 21 May 2022 11:31:28 +0100 Subject: [PATCH] Fix missed night mode updates Commit e84f5866cb98d44c70c8d2676f99421657c0b8f6 was slightly too aggressive about skipping this. --- .../java/name/boyle/chris/sgtpuzzles/GamePlay.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/name/boyle/chris/sgtpuzzles/GamePlay.java b/app/src/main/java/name/boyle/chris/sgtpuzzles/GamePlay.java index a6639c956..6e6269e8d 100644 --- a/app/src/main/java/name/boyle/chris/sgtpuzzles/GamePlay.java +++ b/app/src/main/java/name/boyle/chris/sgtpuzzles/GamePlay.java @@ -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