Fixed inadverdent audio message play on swipe back

pull/74/head
Mark Qvist 2025-03-09 20:44:48 +01:00
parent 1c9342d772
commit 9e058cc12e
1 changed files with 16 additions and 9 deletions

View File

@ -730,6 +730,13 @@ class Messages():
if has_audio:
def play_audio(sender):
touch_event = None; block_play = False
if sender and hasattr(sender, "last_touch"): touch_event = sender.last_touch
if touch_event and hasattr(touch_event, "dpos"):
delta = abs(touch_event.dpos[0]) + abs(touch_event.dpos[1])
if delta >= 2.0: block_play = True
if not block_play:
self.app.play_audio_field(sender.audio_field)
stored_color = sender.md_bg_color
if sender.lsource == self.app.sideband.lxmf_destination.hash: