Commit Graph

1879 Commits

Author SHA1 Message Date
ganfra
4b36eb0374 PIN: address PR review 2023-10-26 15:28:18 +02:00
ganfra
b8ce848a0c PIN : fix quality 2023-10-26 15:25:40 +02:00
ganfra
bd9179dd45 PIN : Fix SetupPinPresenterTest 2023-10-26 14:39:13 +02:00
ganfra
1e3cfcdbd6 PIN : Fix test compilation 2023-10-26 13:10:25 +02:00
ganfra
fae051ef82 Merge branch 'develop' into feature/fga/pin_settings 2023-10-26 11:13:52 +02:00
ganfra
a34604512d Pin: add tests and make LockScreenConfig an injectable data class 2023-10-25 18:39:39 +02:00
Marco Romano
e2a40c8bd1 Voice message bubble design improvements (#1637)
- Fixes color and size of both text and icons.
2023-10-25 17:33:50 +02:00
ganfra
b135670196 Pin : clean remaining pin code attempts 2023-10-25 16:54:34 +02:00
ganfra
1d314e198a PIN: clean pin code storage 2023-10-25 16:45:42 +02:00
ganfra
ed4815c40a PIN: fix and add tests 2023-10-25 16:13:30 +02:00
ganfra
432e209618 PIN unlock : makes sure to load the pin size from storage 2023-10-25 15:07:05 +02:00
ganfra
d59eaab7a8 PIN: add callback on LockScreenEntryPoint 2023-10-25 11:27:19 +02:00
ganfra
f105455bd6 PIN: branch SignOut 2023-10-25 11:15:15 +02:00
David Langley
86cd274b3a 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
3b20120705 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
David Langley
c61d2d3941 Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 22:18:38 +01:00
jonnyandrew
98b75424a8 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
241056b892 Unit and Snapshot tests for error and loading states. 2023-10-24 21:39:53 +01:00
David Langley
470eeb3132 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
80e70a6834 Fix indentation 2023-10-24 19:15:14 +01:00
David Langley
e388ea21b6 Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 17:20:15 +01:00
David Langley
f2e7f9c750 Fix compile error. 2023-10-24 17:14:48 +01:00
ganfra
3e60773166 PIN : branch the mandatory flow 2023-10-24 18:13:41 +02:00
David Langley
d69a1760a8 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
7bad558f16 Remove debugging code. 2023-10-24 16:34:47 +01:00
David Langley
39af4d5e1b 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
Benoit Marty
6dfa2ef2a8 Test coverage: Add missing preview for RoomDetailsView. 2023-10-24 17:17:15 +02:00
Benoit Marty
fa6d13426e Test coverage: Add missing preview for MessagesView. 2023-10-24 17:17:15 +02:00
Benoit Marty
5f7ae9598e Test coverage: extract EmojiItem to improve coverage. 2023-10-24 17:17:15 +02:00
jonnyandrew
d07b7e0d87 Update package of voice message composer (#1633) 2023-10-24 14:48:35 +00:00
ganfra
645c699a6b PIN : start branching logic 2023-10-24 14:19:52 +02:00
jonnyandrew
9046ac4c8a 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
ganfra
b0f27c111e PIN : add some tests to PinEntry 2023-10-24 11:35:11 +02:00
ganfra
080b77fc69 Setup pin : let time for ui to refresh before switching to confirmation step 2023-10-24 11:30:53 +02:00
ganfra
3733ee7e80 PinEntryTextField : add isSecured parameter 2023-10-24 11:30:43 +02:00
jonnyandrew
bdc52332bb Add progress indicator for sending voice messages (#1618)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 08:36:42 +00:00
ganfra
6ee1c2eb4c PIN : fix some pin setup related code 2023-10-23 20:56:39 +02:00
ganfra
cf4ac261a9 Fix dagger compilation 2023-10-23 20:55:58 +02:00
jonnyandrew
5c582bba1b Record and send voice messages (#1596)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-23 17:28:00 +00:00
ganfra
afe6d5a870 Lock settings : branch the flow 2023-10-23 18:11:02 +02:00
David Langley
da345f9afa Merge pull request #1625 from vector-im/langleyd/fix_emoji_shortcut_values
Fix emoji shortcut values
2023-10-23 16:49:56 +01:00
ganfra
eb15ca3901 Merge branch 'develop' into feature/fga/pin_settings 2023-10-23 17:36:12 +02:00
ganfra
40f677192a 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
a0c192266f Update thumbs up emoji in the state provider. 2023-10-23 15:25:28 +01:00
ganfra
bf88fa55dd PIN : fix tests with new LockScreenConfig 2023-10-23 16:03:11 +02:00
ganfra
d66bd4a459 PIN unlock : adjust ui a bit 2023-10-23 15:38:24 +02:00
ganfra
d21623e523 Pin: add LockScreenConfig and address PR reviews 2023-10-23 15:30:17 +02:00
Benoit Marty
bf8cf00c51 Remove unused import 2023-10-23 14:01:23 +02:00
David Langley
3763593a66 Fix emoji shortcut values 2023-10-23 12:06:52 +01:00
Benoit Marty
577527902f Konsist: add test to ensure that functions with @PreviewsDayNight contain ElementTheme composable, and fix existing issues. 2023-10-23 12:23:27 +02:00