Fixed send button not reactivating after send error

This commit is contained in:
Mark Qvist 2024-06-03 12:54:35 +02:00
parent 8e97c05862
commit 381c437886
1 changed files with 4 additions and 4 deletions

View File

@ -1252,6 +1252,10 @@ class SidebandApp(MDApp):
def message_send_dispatch(self, sender=None): def message_send_dispatch(self, sender=None):
self.messages_view.ids.message_send_button.disabled = True 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.root.ids.screen_manager.current == "messages_screen":
if self.outbound_mode_propagation and self.sideband.message_router.get_outbound_propagation_node() == None: if self.outbound_mode_propagation and self.sideband.message_router.get_outbound_propagation_node() == None:
self.messages_view.send_error_dialog = MDDialog( self.messages_view.send_error_dialog = MDDialog(
@ -1383,10 +1387,6 @@ class SidebandApp(MDApp):
) )
self.messages_view.send_error_dialog.open() 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): def peer_show_location_action(self, sender):
if self.root.ids.screen_manager.current == "messages_screen": if self.root.ids.screen_manager.current == "messages_screen":
context_dest = self.messages_view.ids.messages_scrollview.active_conversation context_dest = self.messages_view.ids.messages_scrollview.active_conversation