Commit graph

399 commits

Author SHA1 Message Date
renovate[bot]
74ccdf83f6
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.67 (#1747)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.67

* Fix breaking change in `RustMediaLoader`.

* Fix breaking change in `DefaultCallWidgetSettingsProvider`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Romano <marcor@element.io>
2023-11-07 07:53:24 +00:00
Benoit Marty
a1b97fe99e Remove useless wrapping in lazy block, since the value was assigned later during object construction. 2023-11-02 16:14:21 +01:00
Benoit Marty
3e9710a0c1 Do not throw the exception. 2023-10-31 21:03:43 +01:00
Benoit Marty
2f62779ad4 Sign out: handle no network error. 2023-10-31 21:03:43 +01:00
Benoit Marty
4fb825b5cb TimelineEncryptedHistoryBannerView: render depend on verification and key backup state (#1576) 2023-10-31 21:03:43 +01:00
Benoit Marty
20d6383b8a Map new state BackupUploadState.Error 2023-10-31 21:03:43 +01:00
Jorge Martin Espinosa
3bbaf8e5e7
Improve the logs for TimelineException.CannotPaginate (#1708) 2023-10-31 15:43:18 +00:00
Benoit Marty
90b377b3a5 Secure Storage: improve API for waitForBackupUploadSteadyState() 2023-10-30 20:16:18 +01:00
Jorge Martin Espinosa
356a321788
Fix issues with stuck 'loading...' state and hangup (#1690)
* Fix issues with stuck 'loading...' state and hangu
2023-10-30 17:01:54 +01:00
Marco Romano
a07286ace9
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
0e4141863b
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
44de6adb86
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
3a15b92eb6 SecureBackup: update matrix sdk module. 2023-10-26 18:02:34 +02:00
Jorge Martin Espinosa
030e86f56b
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
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
4784235f8d
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-24 17:20:15 +01: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
renovate[bot]
244c45797f
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
David Langley
5adcaef569 Add new ui for room notifications screen
- Add new ui for room notifications screen
- Fix error when changing default notification setting.
2023-10-20 21:08:44 +01:00
Jorge Martin Espinosa
46f78ef700
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
e2adecbcf4
Merge branch 'develop' into dla/feature/custom_room_notification_settings_list 2023-10-19 16:36:30 +01:00
Marco Romano
33f5c8efb8
Add global context.cacheDir provider. (#1606)
## Type of change

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

## Content

Dagger now provides the app's `cacheDir` when requesting a `@CacheDirectory File`  type.

## Motivation and context

To support some upcoming code that needs the `cacheDir` to be changed during tests.
2023-10-19 14:07:45 +02:00
Marco Romano
5a7f77bc92
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
87b8bfe99d 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
Benoit Marty
21e24990c4 Improve and fix build_rust_sdk.sh after PR review 2023-10-16 18:29:25 +02:00
Benoit Marty
cc2664c519 Use local SDK if the file exist 2023-10-16 13:31:26 +02:00
ganfra
76bbe4dbeb Misc: remove usage of blocking methods #1563 2023-10-13 12:16:31 +02:00
renovate[bot]
054d0a7145
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
7389748f3e Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
Benoit Marty
6be984efc8 Do not restore session with invalid token. 2023-10-10 10:20:31 +02:00
Benoit Marty
124d6bf95f SignedOut mode - WIP 2023-10-10 10:20:31 +02:00
Benoit Marty
8305912b14 Map the new fields of SessionData. 2023-10-10 10:20:31 +02:00
Benoit Marty
70cdb4a2fc Fix compilation warning in tests. 2023-10-10 10:01:01 +02:00
Jorge Martin Espinosa
776d935cfa
Add more tests, particularly to the room list diffing (#1508)
* Add more tests to improve the covered area, particularly the room list diffing
2023-10-06 15:34:36 +02:00
Benoit Marty
34d05e01eb Fetch edited event in advanced (similar to reply mode). 2023-10-04 17:38:17 +02:00
Marco Romano
8f3987b98c Destroy EventTimelineItem pointer after use 2023-10-04 15:00:29 +02:00
Marco Romano
3a49ab984c Handle breaking change in innerRoom.edit() 2023-10-04 10:33:29 +02:00
Marco Romano
fc205698c6
Display poll notifications in the notification drawer (#1467)
Display notifications for polls as if they were message events.
2023-09-29 16:57:03 +02:00
ganfra
74735605e4 Room : makes subscribeToSync/unsubscribeFromSync suspendable and makes sure we keep subscription count 2023-09-28 20:16:19 +02:00
Benoit Marty
c9c7af6e06 Simplify the management of inReplyToEventTimelineItem 2023-09-27 11:31:12 +02:00
Benoit Marty
a192a8823f Ensure getEventTimelineItemByEventId is called when we enter in reply mode. 2023-09-27 10:48:31 +02:00
Benoit Marty
cf657df5fd Fix API break with Matrix SDK 0.1.58. 2023-09-27 09:44:58 +02:00
Benoit Marty
34631f53b3 Avoid hard-coded string. 2023-09-26 17:48:26 +02:00
David Langley
752da37383 Add roomsWithUserDefinedRules data and render list
- get roomsWithUserDefinedRules from rust
- add to state in the presenter
- render in the edit defaults view as a list
2023-09-22 16:16:52 +01:00
Marco Romano
f81a4bf0f8
Upgrade Rust SDK to v0.1.57 (#1401)
- Enables polls in room summaries from https://github.com/vector-im/element-x-android/pull/1387
- Accommodates a few breaking changes
2023-09-21 19:48:19 +00:00
ganfra
4883b63762 Remove usage of async-uniffi as it leads to a deadlocks and memory leaks (#1381) 2023-09-20 12:52:57 +02:00
ganfra
c3df84cb7b Fix warning and yield 2023-09-19 18:06:56 +02:00
ganfra
0bd6ba0984 Fix room member infinite loop 2023-09-19 16:10:27 +02:00
ganfra
f1ad735272
Merge pull request #1371 from vector-im/feature/fga/fix_anr
RoomList : fix ANR (#1370)
2023-09-19 14:17:37 +02:00
ganfra
6746bf5d44 RoomList : fix ANR (#1370) 2023-09-19 14:01:43 +02:00