From cd5ff61138cfb12526d24dcb0c7ec7158ba8a253 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 29 Oct 2022 07:49:27 -0600 Subject: [PATCH] gui_main: Only prompt updates once per launch --- gui/gui_main.py | 4 ++++ resources/constants.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/gui_main.py b/gui/gui_main.py index d9843ac68..621d6aeb8 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -183,9 +183,13 @@ class wx_python_gui: threading.Thread(target=self.check_for_updates).start() def check_for_updates(self, event=None): + if self.constants.has_checked_updates is True: + return + ignore_updates = global_settings.global_settings().read_property("IgnoreAppUpdates") if ignore_updates is not True: self.constants.ignore_updates = False + self.constants.has_checked_updates = True dict = updates.check_binary_updates(self.constants).check_binary_updates() if dict: for entry in dict: diff --git a/resources/constants.py b/resources/constants.py index 4b34ac2b7..dddd2b16d 100644 --- a/resources/constants.py +++ b/resources/constants.py @@ -116,7 +116,8 @@ class Constants: self.wxpython_variant = False # Determine if using wxPython variant self.unpack_thread = None # Determine if unpack thread finished self.cli_mode = False # Determine if running in CLI mode - self.should_nuke_kdks = True # Determine if KDKs should be nuked if unused in /L*/D*/KDKs + self.should_nuke_kdks = True # Determine if KDKs should be nuked if unused in /L*/D*/KDKs + self.has_checked_updates = False # Determine if check for updates has been run ## Hardware self.computer: device_probe.Computer = None # type: ignore