Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SES-1486] Short voice message fix #1523

Merged
merged 31 commits into from
Jul 3, 2024

Conversation

AL-Session
Copy link
Collaborator

@AL-Session AL-Session commented Jun 25, 2024

Contributor checklist

  • I have tested my contribution on these devices:
  • Virtual Pixel 3a, Android 9 API 28
  • Virtual Pixel 3a, Android 14 API 34
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Users could sent very short (sub 1-second) voice messages - which is of little use & likely undesirable. This PR prevents sending such short voice messages and displays a toast using a string from the Strings project to inform the user that they should press and hold the microphone button to record voice messages.

Due to the fact that the user can manipulate the UI faster than we can set-up and tear-down the audio recording mechanism there is some state juggling going on to keep track of what's happening internally. From my own testing, the mechanism in this PR is robust against button mashing and multi-finger weirdness.

This PR fixes the following issue: #1522

To test you might try to:

  • Press and release the microphone button to record an illegally brief voice message (anything < 1 second will show a toast instead), and
  • Press & drag up to lock in one fluid motion to quickly lock to recording a voice message (no toast shown on subsequent cancel or send),
  • Cancelling out of recording a voice message should work as before (no message sent).

##Note
Following discussion w/ Rebecca / Kee the code has been adjusted to merely log any network connectivity issues for the time being rather than inform the user. This will be adjusted again when SES-2319 has been performed.

@AL-Session AL-Session merged commit 1e02845 into oxen-io:dev Jul 3, 2024
1 check passed
@AL-Session AL-Session deleted the SES-1486_ShortVoiceMessageFix branch July 22, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants