From b3aa202a1de6375d535ffc7f1c018168436f9f3b Mon Sep 17 00:00:00 2001 From: l0drex Date: Wed, 9 Nov 2022 16:32:25 +0100 Subject: [PATCH] Move update to top of function Now they will even be updated when it hasn't changed yet --- src/yin_yang.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yin_yang.py b/src/yin_yang.py index ae2e6865..4a93fea1 100755 --- a/src/yin_yang.py +++ b/src/yin_yang.py @@ -32,6 +32,7 @@ def should_be_dark(time_current: time, time_light: time, time_dark: time) -> boo def set_mode(dark: bool, force=False): """Activates light or dark theme""" + update_times() if not force and dark == config.dark_mode: return @@ -45,7 +46,6 @@ def set_mode(dark: bool, force=False): except Exception as e: logger.error('Error while changing theme in ' + p.name, exc_info=e) - update_times() config.dark_mode = dark