From 5a766e66c33800ec4829eb6fa75f41c335ac5704 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Fri, 6 Oct 2023 09:24:51 -0700 Subject: [PATCH] Fix GUI state synchronization to handle connection announce --- ovos_gui/bus.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ovos_gui/bus.py b/ovos_gui/bus.py index f19bcb5..ddf3fb9 100644 --- a/ovos_gui/bus.py +++ b/ovos_gui/bus.py @@ -115,7 +115,6 @@ def open(self): """ GUIWebsocketHandler.clients.append(self) LOG.info('New Connection opened!') - self.synchronize() def on_close(self): """ @@ -228,6 +227,9 @@ def on_message(self, message: str): framework = "qt5" LOG.info(f"New connection for framework: {framework}") self._framework = framework + + # sync after we've determined what framework this GUI uses + self.synchronize() else: # message not in spec # https://github.com/MycroftAI/mycroft-gui/blob/master/transportProtocol.md