From 381c437886f017245eb7939e36c4261f8fd171df Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 3 Jun 2024 12:54:35 +0200 Subject: [PATCH] Fixed send button not reactivating after send error --- sbapp/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbapp/main.py b/sbapp/main.py index 7d88867..9ecd6e2 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -1252,6 +1252,10 @@ class SidebandApp(MDApp): def message_send_dispatch(self, sender=None): self.messages_view.ids.message_send_button.disabled = True + def cb(dt): + self.messages_view.ids.message_send_button.disabled = False + Clock.schedule_once(cb, 0.5) + if self.root.ids.screen_manager.current == "messages_screen": if self.outbound_mode_propagation and self.sideband.message_router.get_outbound_propagation_node() == None: self.messages_view.send_error_dialog = MDDialog( @@ -1382,10 +1386,6 @@ class SidebandApp(MDApp): ], ) self.messages_view.send_error_dialog.open() - - def cb(dt): - self.messages_view.ids.message_send_button.disabled = False - Clock.schedule_once(cb, 0.5) def peer_show_location_action(self, sender): if self.root.ids.screen_manager.current == "messages_screen":