Commit graph

4210 commits

Author SHA1 Message Date
David Langley
5529cb4457 Remove WaveformProgressIndicator call. 2023-10-26 09:02:31 +01:00
David Langley
4de6a5cdd9 Merge branch 'develop' of https://github.com/vector-im/element-x-android into langleyd/custom_waveform 2023-10-26 09:02:14 +01:00
David Langley
827edecda4 Remove WaveformProgressIndicator and waveform library and lint.
-Remove WaveformProgressIndicator - Remove waveform library
- lint.
2023-10-26 08:58:03 +01:00
renovate[bot]
71ef76ad86
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.65 (#1639)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.65

* Fix broken verification flow

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-10-26 08:59:06 +02:00
David Langley
296cd7ca14 Add custom waveform with cursor and nice gesture support. 2023-10-25 22:12:01 +01:00
Marco Romano
9cf17dfa12
Voice message bubble design improvements (#1637)
- Fixes color and size of both text and icons.
2023-10-25 17:33:50 +02:00
David Langley
ef0110d9d7
Merge pull request #1610 from vector-im/dla/feature/custom_room_notification_settings_list
Custom room notification settings list
2023-10-24 23:02:16 +01:00
Marco Romano
6e66c989f4
Receive and play a voice message (#1503)
## Type of change

- [x] Feature
- [ ] Bugfix
- [ ] Technical
- [ ] Other :

## Content

This PR consists of several macro-blocks separated by path/package:
- `messages.impl.mediaplayer` : Global (room-wide) media player, now used only for voice messages but could be used for all media within EX in the future. It is backed by media3's exoplayer. Currently not unit-tested because mocking exoplayer is not trivial.
- `messages.impl.voicemessages.play` : Business logic of a timeline voice message. This is all the logic that manages the voice message bubble.
- `messages.impl.timeline.model` & `messages.impl.timeline.factories`: Timeline code that takes care of creating the `content` object for voice messages.
-  `messages.impl.timeline.components` : The actual View composable that shows the UI inside a voice message bubble.

All the rest is just small related changes that must be done here and there in existing code.

From a high level perspective this is how it works:
- Voice messages are unlike other message bubbles because they carry state (i.e. playing, downloading...) so they have a Presenter managing this state.
- Media content (i.e. the ogg file) of a voice message is downloaded from the rust SDK on first play then stored in a voice messages cache (see the `VoiceMessageCache` class, it is just a subdirectory in the app's cacheDir which is indexed by the matrix content uri). All further play attempts are done from the cache without hitting the rust SDK anymore.
- Playback of the ogg file is handled with the `VoiceMessagePlayer` class which is basically a "view" of the global `MediaPlayer` that allow the voice message to only see the media player state belonging to its media content. 
- Drawing of the waveform is done with an OSS library wrapped in the `WaveformProgressIndicator` composable.

Known issues:
 - The waveform has no position slider.
 - The waveform (and together with it the whole message bubble) is taller than the actual Figma design.
 - Swipe to reply for voice messages is disabled to avoid conflict with the audio scrubbing gesture (to reply to a voice message you have to use the long press menu).
 - The loading indicator is always shown (there is no delay).
 - Voice messages don't stop playing when redacted.

## Motivation and context

https://github.com/vector-im/element-meta/issues/2083

## Screenshots / GIFs

Provided by Screenshot tests in the PR itself.
2023-10-24 21:47:51 +00:00
ElementBot
f5999a5a35 Update screenshots 2023-10-24 21:31:36 +00:00
David Langley
6fa73963c1
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 22:18:38 +01:00
jonnyandrew
8c7a0c0e0a
Allow deleting a recorded voice message (#1635)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 21:02:19 +00:00
David Langley
d13b7ca1e7
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 21:47:08 +01:00
David Langley
75e95333a8 Unit and Snapshot tests for error and loading states. 2023-10-24 21:39:53 +01:00
renovate[bot]
db408dedbf
Update dependency com.google.testparameterinjector:test-parameter-injector to v1.14 (#1636)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-24 20:50:31 +02:00
David Langley
1239edb4a6 Merge branch 'dla/feature/custom_room_notification_settings_list' of https://github.com/vector-im/element-x-android into dla/feature/custom_room_notification_settings_list 2023-10-24 19:15:18 +01:00
David Langley
02de87235a Fix indentation 2023-10-24 19:15:14 +01:00
ElementBot
21f325686f Update screenshots 2023-10-24 16:35:20 +00:00
David Langley
4784235f8d
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 17:20:15 +01:00
David Langley
117614d59d Fix compile error. 2023-10-24 17:14:48 +01:00
Benoit Marty
c04f95e974
Merge pull request #1634 from vector-im/feature/bma/codeCoverage
Code coverage
2023-10-24 17:59:18 +02:00
David Langley
0e6f7623ca
Merge pull request #1621 from vector-im/dla/feature/room_notification_settings_ui_update
Room notification settings UI update
2023-10-24 16:40:20 +01:00
David Langley
03315ae77b Merge branch 'dla/feature/custom_room_notification_settings_list' of https://github.com/vector-im/element-x-android into dla/feature/room_notification_settings_ui_update 2023-10-24 16:36:27 +01:00
David Langley
d7386856a1 Remove debugging code. 2023-10-24 16:34:47 +01:00
David Langley
5324eb0f1a Address comments
- Add additional states to preview.
- Add TODO description for commented code
- Move showUserDefinedSettingStyle from the node to the view for testability.
2023-10-24 16:27:26 +01:00
ElementBot
02982b6626 Update screenshots 2023-10-24 17:17:15 +02:00
Benoit Marty
b4cc11ec1e Test coverage: Add test on DefaultNavigationStateService 2023-10-24 17:17:15 +02:00
Benoit Marty
aadfb79945 Test coverage: Add missing preview for RoomDetailsView. 2023-10-24 17:17:15 +02:00
Benoit Marty
b5839aa42a Test coverage: Add missing preview for MessagesView. 2023-10-24 17:17:15 +02:00
Benoit Marty
307680c62a Test coverage: extract EmojiItem to improve coverage. 2023-10-24 17:17:15 +02:00
Benoit Marty
3fbe8b61ba Test coverage: Exclude :libraries:matrix:impl module, it contains only wrappers to access the Rust Matrix SDK api, and mappers. It is not really relevant to unit test that: there is no logic to test. 2023-10-24 17:17:15 +02:00
jonnyandrew
9b027fcb67
Update package of voice message composer (#1633) 2023-10-24 14:48:35 +00:00
Benoit Marty
0b984327db
Merge pull request #1632 from vector-im/feature/bma/backupMapper
Add `BackupState` and `BackupStateMapper`
2023-10-24 16:06:59 +02:00
jonnyandrew
f1b142f002
Add voice message recording duration indicator and limit (#1628)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 11:44:53 +00:00
Benoit Marty
04ed06cf9a Add BackupState and BackupStateMapper from the feature/bma/secureBackup branch to ensure that we do not upgrade the SDK with no support of KeyBackup.
This will act as a poison pill to avoid mistake when building new version of the SDK.
2023-10-24 11:12:06 +02:00
jonnyandrew
8c0d9cc6a0
Add progress indicator for sending voice messages (#1618)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 08:36:42 +00:00
Jorge Martin Espinosa
fc8d16693b
Set tracing of matrix_sdk_ui::timeline to trace (#1630) 2023-10-24 09:37:41 +02:00
renovate[bot]
43809bee04
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.64 (#1629)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-24 08:18:09 +02:00
jonnyandrew
b476654489
Record and send voice messages (#1596)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-23 17:28:00 +00:00
David Langley
503efbf4c0
Merge pull request #1625 from vector-im/langleyd/fix_emoji_shortcut_values
Fix emoji shortcut values
2023-10-23 16:49:56 +01:00
ElementBot
7e6cc4db9c Update screenshots 2023-10-23 14:39:14 +00:00
ganfra
005e5cc1a1
Merge pull request #1624 from vector-im/feature/fga/pin_auth_ui
PIN : unlock screen ui
2023-10-23 16:35:22 +02:00
David Langley
5d533cc2c6 Merge branch 'langleyd/fix_emoji_shortcut_values' of https://github.com/vector-im/element-x-android into langleyd/fix_emoji_shortcut_values 2023-10-23 15:25:33 +01:00
David Langley
f159ca9d7d Update thumbs up emoji in the state provider. 2023-10-23 15:25:28 +01:00
ganfra
20eed4f7d7 PIN : fix tests with new LockScreenConfig 2023-10-23 16:03:11 +02:00
ElementBot
4bcb17f09f Update screenshots 2023-10-23 13:49:14 +00:00
ganfra
a6b4b71b5d
Merge pull request #1600 from vector-im/renovate/androidx.sqlite-sqlite-ktx-2.x
Update dependency androidx.sqlite:sqlite-ktx to v2.4.0
2023-10-23 15:47:44 +02:00
ganfra
da4dd44654 PIN unlock : adjust ui a bit 2023-10-23 15:38:24 +02:00
ganfra
05a999acd4 Pin: add LockScreenConfig and address PR reviews 2023-10-23 15:30:17 +02:00
ElementBot
6478166263 Update screenshots 2023-10-23 12:11:23 +00:00
Benoit Marty
f8512d3964 Remove unused import 2023-10-23 14:01:23 +02:00