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
Improved Voice Messages UI #365
Conversation
Non-continues updates from waveform view seeking.
That should be fine for testing now. |
@metaphore I tested this PR, I found a few issues:
|
A few things: • If I tap a voice message while it's still loading, the app crashes. https://jmp.sh/K36ywLW • Let's cache the volume samples in the database. I do this on iOS because parsing them out is a relatively expensive operations (especially for long voice messages). |
Attachment audio extras job. Job manager supports parcelable types now.
@Brice-W Should be good to test now.
I couldn't reproduce that. Maybe it was fixed in the process.
It works for me on 21, but not on 22. There's an issue with the media player we are using, it might be incompatible with some system configurations, but it doesn't look like an easy fix could solve that. I can look into that but in a separate task.
For the APIs < 23 there is no support to extract the required data from audio files, thus fake waveform data is displayed. |
@Brice-W I found a way to patch the issue related to API 23, now it should work as expected. |
@metaphore I tested the 3 cases again
I just saw something else on APIs 21 -> 23: the voice message duration isn't displayed on the right of the message |
Thanks @Brice-W
Oh yeah, sorry, forgot to mention that. It's the same as
So I cannot read it along with the raw audio data and thus the duration is just left empty and not displayed. |
…into audio-view-design-update # Conflicts: # src/org/thoughtcrime/securesms/database/helpers/SQLCipherOpenHelper.java
Merged through #370 (except for the last dev merge) |
View.inflate(context, R.layout.message_audio_view, this) | ||
container = findViewById(R.id.audio_widget_container) | ||
controlToggle = findViewById(R.id.control_toggle) | ||
playButton = findViewById(R.id.play) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for future reference, you don't need to do this in Kotlin :) . You can just reference the view directly without first doing findViewById(...)
, assigning it, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also why we have the convention of using lower camel case for view IDs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was done intentionally. Kotlin synthetics are no longer recommended practice by Google https://www.reddit.com/r/androiddev/comments/ala9p2/why_kotlinx_synthetic_is_no_longer_a_recommended/?utm_source=amp&utm_medium=&utm_content=post_num_comments
They slow down things a bit and View Binding seems like a good alternative https://developer.android.com/topic/libraries/view-binding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay then, what a Google move haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New day, new library at Google :) once this thing is out of alpha it might become the default xml view markup replacement https://developer.android.com/jetpack/compose
New visual design for message audio attachments.