Commit Graph

307 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
a52d78c3b3 Add intentional mentions (#1843)
* Add intentional mentions
2023-11-21 17:34:00 +01:00
Jorge Martin Espinosa
b8ee82a912 Integrate mentions in the composer (#1799)
* Integrate mentions in the composer:

    - Add `MentionSpanProvider`.
    - Add custom colors needed for mentions.
    - Use the span provider to render mentions in the composer.
    - Allow selecting users from the mentions suggestions to insert a mention.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-20 18:14:02 +01:00
Benoit Marty
71ef0c3c78 Merge pull request #1834 from vector-im/feature/bma/readReceipts
Render send state and read receipts
2023-11-20 14:39:13 +01:00
Benoit Marty
3c79390e45 BackupState.DISABLED has been removed. Now when the value is UNKNOWN, the app need to invoke EncryptionService.doesBackupExistOnServer() to check if a Backup exists. 2023-11-17 17:32:14 +01:00
Benoit Marty
3d2d0bff6a Read receipts: mapping 2023-11-16 14:05:00 +01:00
Benoit Marty
968a4d3fd0 Add a View to show the beginning of the timeline (parity with iOS) 2023-11-14 17:31:42 +01:00
Jorge Martin Espinosa
d29052eb47 Add active call icon to room list summaries (#1792)
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-13 15:35:11 +00:00
Benoit Marty
79806852ca Move Knit to Gradle catalog and use alias(libs.plugins.kotlin.serialization). Fix issue with JNA 2023-11-13 09:58:00 +01:00
Benoit Marty
765ede0093 Replace hard-coded value by value from gradle datalog 2023-11-10 16:25:58 +01:00
Marco Romano
8f1b699271 Don't leak MediaFileHandle when downloading voice messages (#1748)
Uses the new `MediaFile.persist()` [API](https://github.com/matrix-org/matrix-rust-sdk/pull/2789) to cache voice messages.
This allows to close the `MediaFile` handle after use and keeping the file.
Also disables rust sdk caching for voice messages as we'll use the app's cache dir for that purpose.

Fixes: https://github.com/vector-im/element-meta/issues/2175
2023-11-09 14:15:11 +00:00
Benoit Marty
18ec3ae7c8 Merge pull request #1769 from vector-im/feature/bma/chatBackupWaitingForSync
Ensure BackupState and RecoveryState values are set from the SDK only…
2023-11-09 09:21:51 +01:00
renovate[bot]
dd57197f32 Update kotlin (#1697)
* Update kotlin

* Lower Sonar RAM usage, remove redundant `Dkotlin.daemon.jvm.options`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-11-08 12:58:14 +00:00
Benoit Marty
8d3af2a1fc Ensure BackupState and RecoveryState values are set from the SDK only when the first sync is finished. 2023-11-08 11:33:02 +01:00
Benoit Marty
8b85aa51e2 Konsist: check that if sealed interface is used in parameter of Composable, it has the @Stable or @Immutable annotation 2023-11-03 15:19:55 +01:00
Benoit Marty
c5f3562454 Konsist: check if sealed class could be sealed interface and fix existing issues. 2023-11-03 15:19:55 +01:00
Jorge Martin Espinosa
3fc8f1aaec Use Parallel GC and bump RAM usage (#1734)
* Use Parallel GC and bump RAM usage

* Build only `app` project in `Build APKs (debug)` flow.

* Remove redundant JNA dependency
2023-11-03 10:34:49 +01:00
Benoit Marty
72ba9997a2 Sign out: handle no network error. 2023-10-31 21:03:43 +01:00
Benoit Marty
898392dde2 Map new state BackupUploadState.Error 2023-10-31 21:03:43 +01:00
Jorge Martin Espinosa
f7f3925fc9 [Element Call] Keep MatrixClient alive while the call is working (#1695)
* Element Call: keep MatrixClient alive to get event updates
2023-10-31 16:58:33 +01:00
Benoit Marty
29e1e9b316 Secure Storage: improve API for waitForBackupUploadSteadyState() 2023-10-30 20:16:18 +01:00
Marco Romano
d05dd11485 Split VoiceMessageType from AudioMessageType (#1664)
Currently, for compatibility reasons, we implement MSC3245v1 which puts the voice data inside an audio message type. Though at times it seems impractical to deal with a single message type which effectively represents 2 different kinds of messages.

This PR creates a new message type called `VoiceMessageType` which is used whenever we receive an event with `"msgtype": "m.audio"` which also has the `"org.matrix.msc3245.voice": {}` field. This makes it easier to process voice messages as different entities throughout the rest of the codebase.
2023-10-27 16:02:16 +02:00
Marco Romano
1014380e32 Always treat waveform as List<Float> (#1663)
[MSC3246](https://github.com/matrix-org/matrix-spec-proposals/pull/3246) specifies the waveform as a list of ints because:

> Because floating point numbers are not allowed in Matrix events

Though DSP on audio data is almost always done using their floating point representation.
This PR brings the float<->int rescaling in the `matrix` module so that the application code can always work with float waveform samples.
2023-10-27 12:49:58 +00:00
Jorge Martin Espinosa
0bd9c78836 Initial support for member suggestions (#1631)
* Initial support for member suggestion (search and UI)

* Add custom `BottomSheetScaffold` implementation to workaround several scrolling bugs

* Start searching as soon as `@` is typed, add UI following initial designs

* Extract suggestion processing code

* Extract component, add previews, fix tests

* Add tests

* Add exception from kover to the forked bottom sheet code

* Add a feature flag for mentions

- Extract composer & mention suggestions to their composable.
- Extract mentions suggestions processing to its own class.
- Add `MatrixRoom.canTriggerRoomNotification` function.
- Update strings and conditions for displaying the `@room` mention.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-27 10:26:40 +00:00
Benoit Marty
b5ffa6eef3 SecureBackup: update matrix sdk module. 2023-10-26 18:02:34 +02:00
Jorge Martin Espinosa
c40a39bbfa Update the chat screen UI using RoomInfo. (#1640)
* Update the chat screen UI using `RoomInfo`.

This is specially useful for getting live values for `hasRoomCall`.

* Ensure the first `MatrixRoomInfo` is emitted ASAP

* Try excluding `*Present$present$*` inner functions from kover as separate entities

* Update strings

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-26 14:27:42 +00:00
David Langley
e388ea21b6 Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 17:20:15 +01:00
Benoit Marty
1fa745dcbd 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
Jorge Martin Espinosa
e61c7d8de0 Set tracing of matrix_sdk_ui::timeline to trace (#1630) 2023-10-24 09:37:41 +02:00
renovate[bot]
7c5fab732b Update dependency org.matrix.rustcomponents:sdk-android to v0.1.63 (#1619)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.63

* Update Element Call integrated APIs

* Take into account the new `MessageType.Other` from the SDK

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-10-20 22:32:59 +02:00
Marco Romano
7e8f78c05d Document the nuances in UserId and SessionId types. (#1616) 2023-10-20 12:25:20 +00:00
Jorge Martin Espinosa
5e547269e7 Integrate Element Call with widget API (#1581)
* Integrate Element Call with widget API.

- Add `appconfig` module and extract constants that can be overridden in forks there.
- Add an Element Call feature flag, disabled by default.
- Refactor the whole `ElementCallActivity`, move most logic out of it.
- Integrate with the Rust Widget Driver API (note the Rust SDK version used in this PR lacks some needed changes to make the calls actually work).
- Handle calls differently based on `CallType`.
- Add UI to create/join a call.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-19 15:38:43 +00:00
David Langley
3ecabd71c0 Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-19 16:36:30 +01:00
Marco Romano
80870adfe3 Extract more content from audio messages. (#1607)
`TimelineItemAudioContent`:
- Use `java.time.Duration` instead of milliseconds. This will ease up things in the future because currently milliseconds are sent over the wire but in the future seconds will be sent (as per the stable MSC). Using `Duration` will allow our downstream code to be independent of what's passed over the wire.
- Rename `audioSource` property to `mediaSource` to better match its type.

`AudioMessageType`:
- Add and populate new fields `details` and `isVoiceMessage` to be used by voice messages.
2023-10-19 13:32:43 +02:00
David Langley
af4a1d3fd6 Merge branch 'develop' of https://github.com/vector-im/element-x-android into dla/feature/custom_room_notification_settings_list 2023-10-18 22:07:14 +01:00
renovate[bot]
31d5e7395f Update dependency org.matrix.rustcomponents:sdk-android to v0.1.62 (#1562)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.62
* Add `sendVoiceMessage()` API from https://github.com/matrix-org/matrix-rust-sdk/pull/2697
* Fix other breaking changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Romano <marcor@element.io>
2023-10-13 08:19:30 +00:00
Benoit Marty
7afae87b3e Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
Benoit Marty
07a2643bd2 Merge pull request #1549 from vector-im/feature/bma/unknownMsgtype
Render unknown msgtype
2023-10-12 10:56:35 +02:00
Benoit Marty
305fb81b8a Merge pull request #1520 from vector-im/feature/bma/sessionDb
Improve session db and improve deleted session behavior
2023-10-11 16:56:54 +02:00
Benoit Marty
266612f9da MessageContent.type cannot be null 2023-10-11 16:14:15 +02:00
Benoit Marty
24963915b9 Move OtherState to its own file. 2023-10-11 16:06:49 +02:00
Benoit Marty
8e581109aa Move FormattedBody to its own file. 2023-10-11 16:05:47 +02:00
Benoit Marty
345c032a4e Move MembershipChange to its own file. 2023-10-11 16:05:19 +02:00
Benoit Marty
987b97a4b9 Move MessageFormat to its own file. 2023-10-11 16:04:41 +02:00
Benoit Marty
f6bd33231d Move MessageType to its own file. 2023-10-11 16:03:18 +02:00
Benoit Marty
d79affb3a4 Move InReplyTo to its own file. 2023-10-11 16:01:36 +02:00
Benoit Marty
16841e9721 data object 2023-10-10 17:31:04 +02:00
Benoit Marty
529872a4f2 Do not restore session with invalid token. 2023-10-10 10:20:31 +02:00
Benoit Marty
0b3fcecbed SignedOut mode - WIP 2023-10-10 10:20:31 +02:00
Jorge Martin Espinosa
ae7c2257df Improve coverage in permalinks package (#1502)
* Improve coverage in permalinks package
2023-10-06 11:37:26 +02:00
Benoit Marty
19f011b19f Convert object to data object 2023-10-05 10:43:00 +02:00