Commit Graph

440 Commits

Author SHA1 Message Date
Benoit Marty
10f513786e Merge pull request #1942 from vector-im/renovate/org.matrix.rustcomponents-sdk-android-0.x
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.73
2023-12-01 17:49:20 +01:00
Benoit Marty
44f397687e Fix compilation issue 2023-12-01 15:29:45 +01:00
Benoit Marty
df897e4fb8 Merge pull request #1925 from vector-im/feature/bma/testAndroidMediaPreProcessor
Feature/bma/test android media pre processor
2023-12-01 13:53:55 +01:00
ganfra
1c56addb2b Merge pull request #1938 from vector-im/feature/fga/user_detail_direct_chat
Feature/fga/user detail direct chat
2023-12-01 13:46:01 +01:00
ganfra
270c4612f5 Merge pull request #1920 from vector-im/feature/fga/dynamic_room_list_incremental_load
RoomList: introduce incremental loading to improve performances.
2023-11-30 19:51:13 +01:00
ganfra
03a2e31d46 Merge branch 'develop' into feature/fga/user_detail_direct_chat 2023-11-30 18:10:51 +01:00
ganfra
cd28687eb4 StartDM : add tests 2023-11-30 18:05:26 +01:00
Jorge Martin Espinosa
0a91184e4a Set a default power level to join calls in room (#1927)
* Set a default power level to join calls.

Also, create new rooms taking this power level into account.

* Modify test to make sure we display the disabled state even when there is an ongoing call

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-30 09:47:48 +00:00
Benoit Marty
1673fe7354 Remove useless suspend modifier 2023-11-29 17:03:27 +01:00
Jorge Martin Espinosa
c739ebc0ee Try to make all collections used in Compose code immutable (#1922)
* Try to make all collections used in Compose code immutable.

Mark sealed interfaces as `@Immutable` too

* Add gradle code to check the compose compiler reports

* Fix some more unstable classes
2023-11-29 15:02:08 +00:00
ganfra
a324e18982 RoomList: introduce incremental loading to improve performances. 2023-11-29 11:53:15 +01:00
Marco Romano
c6fdc79f83 Upgrade to rust sdk 0.1.71 (#1905)
https://github.com/matrix-org/matrix-rust-components-kotlin/releases/tag/sdk-v0.1.71

There are breaking changes as specified in: https://github.com/vector-im/element-x-android/issues/1898 plus the one related to the poll history feature.
2023-11-29 10:34:51 +01:00
Jorge Martin Espinosa
bbc4d18a9d Open room member avatar in a media viewer (#1911)
* Open room member avatar in viewer.

The `MediaViewer` was extracted to its own library module.

* Update screenshots

* Restore KSP processor in `:libraries:mediaviewer:api`, this should generate Showkase components again.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-28 17:39:41 +00:00
Benoit Marty
04be1f0385 Use kotlin.time.Duration instead of java.time.Duration. Also use Duration in TimelineItemVideoContent, like in TimelineItemAudioContent and TimelineItemVoiceContent 2023-11-27 21:58:58 +01:00
jonnyandrew
634d8167ea Allow polls to be edited (#1869)
Polls can be edited if they do not have any votes

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-24 16:47:58 +00:00
ganfra
b844862785 Fix see room in room list after leaving it #1006 2023-11-24 12:03:37 +01:00
Benoit Marty
73a062451c Remove UnknownMessageType, should be handled by OtherMessageType now. 2023-11-23 20:18:53 +01:00
ganfra
6e4635b4cd Merge pull request #1865 from vector-im/feature/fga/room_list_dynamic_api
RoomList : rework a bit the api and make usage of entriesWithDynamicAdapter
2023-11-23 12:07:55 +01:00
Jorge Martin Espinosa
f55d347387 Add plain text representation of messages (#1850)
* Add plain text representation of messages.

This is used in the room list as the last message in a room, in the message summary when a message is selected, in the 'replying to' block, in the 'replied to' block in a message in the timeline, and in notifications.
2023-11-23 08:29:20 +01:00
ganfra
d04b26365d RoomList : rework a bit the api and make usage of entriesWithDynamicAdapters 2023-11-22 18:06:19 +01:00
Jorge Martin Espinosa
a52d78c3b3 Add intentional mentions (#1843)
* Add intentional mentions
2023-11-21 17:34:00 +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
be8ccee0c7 Merge pull request #1832 from vector-im/renovate/org.matrix.rustcomponents-sdk-android-0.x
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.68
2023-11-20 14:00:23 +01:00
Benoit Marty
66c9bc6c62 Merge branch 'develop' into feature/bma/readReceipts 2023-11-20 12:15:32 +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
170e35e0e3 Fix wrong list used when forwarding an Event to some rooms fails. 2023-11-16 17:54:22 +01:00
ganfra
a171690713 Suppress usage of removeTimeline method (#1824) 2023-11-16 14:11:00 +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
Marco Romano
00a750a31a Always ensure media temp dir exists (#1790)
<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md) before submitting your pull request -->
 
## Type of change

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

## Content

`RustMediaLoader` creates the "${cacheDir}/temp/media" dir only once at class creation. Unfortunately when clearing an app's cache this directory will be deleted and the app's process won't be killed, so subsequent usages of the same instance of `RustMediaLoader` will not work because `cacheDirectory` does not exists. This fix makes sure that such directory is always checked and created if needed.

## Motivation and context

Fixes https://github.com/vector-im/element-x-android/issues/1788

## Screenshots / GIFs

<!--
We have screenshot tests in the project, so attaching screenshots to a PR is not mandatory, as far as there
is a Composable Preview covering the changes. In this case, the change will appear in the file diff.
Note that all the UI composables should be covered by a Composable Preview.

Providing a video of the change is still very useful for the reviewer and for the history of the project.

You can use a table like this to show screenshots comparison.
Uncomment this markdown table below and edit the last line `|||`:
|copy screenshot of before here|copy screenshot of after here|

|Before|After|
|-|-|
|||
 -->

## Tests

<!-- Explain how you tested your development -->

- Step 1
- Step 2
- Step ...

## Tested devices

- [ ] Physical
- [ ] Emulator
- OS version(s):

## Checklist

<!-- Depending on the Pull Request content, it can be acceptable if some of the following checkboxes stay unchecked. -->

- [ ] Changes have been tested on an Android device or Android emulator with API 23
- [ ] UI change has been tested on both light and dark themes
- [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
- [ ] Pull request is based on the develop branch
- [ ] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#changelog
- [ ] Pull request includes screenshots or videos if containing UI changes
- [ ] Pull request includes a [sign off](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off)
- [ ] You've made a self review of your PR
2023-11-13 15:52:53 +01: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
a9995886c0 Move remaining hard-coded dependency to Gradle catalog. We had 2 different version of material3 library. 2023-11-10 16:56:04 +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
Benoit Marty
1026648ee8 Merge pull request #1770 from vector-im/feature/bma/noBannerIfKeyBackIsEnabled
Show full history if key backup is enabled.
2023-11-08 14:00:25 +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
cf0e92f7f6 Show full history if key backup is enabled. 2023-11-08 12:41:15 +01: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
Jorge Martin Espinosa
6fa785a4a3 Fix crash on logout (#1749) 2023-11-07 14:24:31 +01:00
renovate[bot]
8b5e8bf6da 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
aeb4c6eba0 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
7634a5512f Do not throw the exception. 2023-10-31 21:03:43 +01:00
Benoit Marty
72ba9997a2 Sign out: handle no network error. 2023-10-31 21:03:43 +01:00
Benoit Marty
654f344640 TimelineEncryptedHistoryBannerView: render depend on verification and key backup state (#1576) 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
06514d8be5 Improve the logs for TimelineException.CannotPaginate (#1708) 2023-10-31 15:43:18 +00:00
Benoit Marty
29e1e9b316 Secure Storage: improve API for waitForBackupUploadSteadyState() 2023-10-30 20:16:18 +01:00
Jorge Martin Espinosa
22767031d9 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