mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2025-02-23 01:39:52 +01:00
Auto switch message mode on attachment
This commit is contained in:
parent
752c080d83
commit
235bfa6459
@ -1767,6 +1767,11 @@ class SidebandApp(MDApp):
|
|||||||
if self.root.ids.screen_manager.current == "messages_screen":
|
if self.root.ids.screen_manager.current == "messages_screen":
|
||||||
self.object_details_action(self.messages_view, from_conv=True)
|
self.object_details_action(self.messages_view, from_conv=True)
|
||||||
|
|
||||||
|
def outbound_mode_reset(self, sender=None):
|
||||||
|
self.outbound_mode_paper = False
|
||||||
|
self.outbound_mode_propagation = False
|
||||||
|
self.outbound_mode_command = False
|
||||||
|
|
||||||
def message_propagation_action(self, sender):
|
def message_propagation_action(self, sender):
|
||||||
if self.outbound_mode_command:
|
if self.outbound_mode_command:
|
||||||
self.outbound_mode_paper = False
|
self.outbound_mode_paper = False
|
||||||
@ -1796,6 +1801,8 @@ class SidebandApp(MDApp):
|
|||||||
tf = open(path, "rb")
|
tf = open(path, "rb")
|
||||||
tf.close()
|
tf.close()
|
||||||
self.attach_path = path
|
self.attach_path = path
|
||||||
|
if self.outbound_mode_command:
|
||||||
|
self.outbound_mode_reset()
|
||||||
|
|
||||||
if RNS.vendor.platformutils.is_android():
|
if RNS.vendor.platformutils.is_android():
|
||||||
toast("Attached \""+str(fbn)+"\"")
|
toast("Attached \""+str(fbn)+"\"")
|
||||||
@ -2048,6 +2055,8 @@ class SidebandApp(MDApp):
|
|||||||
|
|
||||||
self.sideband.ui_stopped_recording()
|
self.sideband.ui_stopped_recording()
|
||||||
if self.message_process_audio():
|
if self.message_process_audio():
|
||||||
|
if self.outbound_mode_command:
|
||||||
|
self.outbound_mode_reset()
|
||||||
self.message_send_action()
|
self.message_send_action()
|
||||||
Clock.schedule_once(cb_s, 0.35)
|
Clock.schedule_once(cb_s, 0.35)
|
||||||
|
|
||||||
@ -2195,6 +2204,8 @@ class SidebandApp(MDApp):
|
|||||||
else:
|
else:
|
||||||
self.message_process_audio()
|
self.message_process_audio()
|
||||||
|
|
||||||
|
if self.outbound_mode_command:
|
||||||
|
self.outbound_mode_reset()
|
||||||
self.update_message_widgets()
|
self.update_message_widgets()
|
||||||
toast("Added recorded audio to message")
|
toast("Added recorded audio to message")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user