Commit graph

1230 commits

Author SHA1 Message Date
Jorge Martin Espinosa
598a63d267
Use for instead of forEach with ranges (#1035)
* Use `for` instead of `forEach` with ranges.

`forEach` is several times slower when used with ranges.

* Add changelog
2023-08-08 08:48:39 +00:00
ganfra
b5b120d09e
Update rust sdk to 0.1.39 (#1024)
Co-authored-by: ganfra <francoisg@element.io>
2023-08-02 19:53:05 +00:00
ganfra
ac7412c2d8
Feature/fga/matrix client versions (#1022)
* Extract a RustMatrixClientFactory

* Use serverVersions api on client builder to speed up startup.

* Clean up

* Fix compilation of sample

---------

Co-authored-by: ganfra <francoisg@element.io>
2023-08-02 18:56:26 +00:00
Jorge Martin Espinosa
82c5b1a348
Fix notification rendering by removing leftover test code (#1019) 2023-08-02 11:55:13 +00:00
renovate[bot]
9bc336d17c
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.38 (#1015)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.38

* Fix API breaks

* Use `roomListItem.avatarUrl` if possible

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-08-01 10:29:36 +00:00
ganfra
62a367520e
RoomList: use same logic than Timeline for caching built items. (#1013)
* RoomList: use same logic than Timeline for caching built items. Extract into reusable components.

* RoomList: fix tests

* Fix `DiffCacheUpdater` docs

---------

Co-authored-by: ganfra <francoisg@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-08-01 08:53:41 +00:00
David Langley
0b95ef09b7
Reaction summary view and sorting reactions by count and then timestamp (#942)
* Sort reactions by count and then timestamp

- Sort reactions within an aggregation by timestamp descending. This puts the most recent at the top, useful in cases like the reaction summary view or getting the most recent reaction.
- Sort aggregated reactions by count and then timestamp ascending, using the most recent reaction in the aggregation. This appends new aggregations on the end of the reaction layout.

* Add reaction summary view

* fix warnings

* Fix test unit tests and add sorting tests

- Fix broken build in test code
- Add a test for reaction sorting

* Remove default closure, move logic to presenter and add tests

* Update screenshots

* Fix imports

* Revert Screenshots I didn't update

* Fix imports remove screetshots

* Update screenshots

* Update screenshots

* Address comments.

* Update screenshots

* Remove unnecessary snapshotFlow

* Fix code quality checks

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-07-31 17:39:20 +00:00
Marco Romano
2a59e6ae78
Properly inline tryOrNull() (#1003)
Nullable params can't be inlined, default empty lambdas are therefore preferred.
2023-07-31 13:49:57 +00:00
ElementBot
784b84d1e8
Sync Strings from Localazy (#1002)
Co-authored-by: bmarty <bmarty@users.noreply.github.com>
2023-07-31 13:49:52 +00:00
Jorge Martin Espinosa
eb80f5bbfe
Fix detekt issues in develop (#1004)
Co-authored-by: Marco Romano <marcor@element.io>
2023-07-31 14:01:08 +02:00
ganfra
f1d438e701
Merge pull request #997 from vector-im/feature/fga/remove_from_main_thread
Feature/fga/remove from main thread
2023-07-31 13:39:06 +02:00
ganfra
13209b0aa0 Merge branch 'develop' into feature/fga/safer_callback_flows 2023-07-31 11:36:59 +02:00
ganfra
e9802ffea6 Small changes after reviews 2023-07-31 11:36:28 +02:00
ganfra
fa9fa69697 Makes sure NotificationService is suspendable 2023-07-28 17:56:17 +02:00
Benoit Marty
5ed29b1466
Merge pull request #986 from vector-im/feature/bma/bigFontSizeImprovement
Big font size improvements
2023-07-28 17:02:29 +02:00
Benoit Marty
822bb82347
Merge pull request #967 from vector-im/feature/bma/detektConfig
Update detekt config.
2023-07-28 16:47:26 +02:00
Benoit Marty
39bd0b9746 fix typo 2023-07-28 16:34:37 +02:00
ganfra
ea35e36aff Timeline: move TimelineEncryptedHistoryPostProcessor off the main thread 2023-07-28 16:22:30 +02:00
Benoit Marty
36d2246e2a
Merge pull request #991 from vector-im/feature/bma/redactRegardingPowerLevel
Allow user with enough power level to redact other's messages (#969)
2023-07-28 16:13:54 +02:00
Benoit Marty
4cb0417afa Showkase does not take into account the fontScale parameter of the Preview annotation, so alter the LocalDensity in the CompositionLocalProvider. 2023-07-28 16:08:38 +02:00
Benoit Marty
bf0b364da9 Split long line. 2023-07-28 16:08:38 +02:00
ganfra
bd5e1e6520 No crash when room is already destroyed... 2023-07-28 13:40:18 +02:00
Benoit Marty
5ace169440 Update the API and add UI screenshots demoing it. 2023-07-28 10:29:13 +02:00
Benoit Marty
26bae1a831 Move extension to dedicated file. 2023-07-28 10:01:22 +02:00
ganfra
878aa39781 Also catch Exception instead of RoomListException 2023-07-27 21:12:07 +02:00
ganfra
1d97412523 Fix warning 2023-07-27 21:11:34 +02:00
ganfra
6cd764dc1f Timeline: fetch members only after timeline is ready 2023-07-27 20:49:56 +02:00
ganfra
69c42a3cbc Update rust sdk to 0.1.37 2023-07-27 20:49:27 +02:00
Benoit Marty
82e35cda0d Allow user with enough power level to redact other's messages (#969) 2023-07-27 18:42:45 +02:00
Benoit Marty
0627a1155c Auto capitalize first letter of sentences for messages, room topic and bug report description. (#948) 2023-07-27 17:13:42 +02:00
Benoit Marty
036658232b
Merge pull request #983 from vector-im/feature/bma/lintErrors
Update lint rules, remove unused resource and sync strings.
2023-07-27 15:59:38 +02:00
Benoit Marty
3c07fea2dd Improve rendering of Text composer regarding fontScale. (#984) 2023-07-27 15:45:02 +02:00
Benoit Marty
3c1f764bee Improve rendering of "All chats" regarding fontScale. (#984) 2023-07-27 15:44:56 +02:00
Benoit Marty
94c6223be2 Set expicit fontSize parameter (to default value 1f), to test different fontScale more easily. 2023-07-27 15:43:20 +02:00
Jorge Martin Espinosa
914235228d
[Compound] Implement platform components (Switch, RadioButton, Checkbox) (#982)
* Create our custom Switch component

* Update RadioButton colors

* Update Checkbox colors

* Fix padding in `ReplyToContent`

* Add `indeterminate` and `hasError` parameters to `CheckBox`.

Improve previews.

* Improve Switch previews.

* Improve RadioButton previews.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-07-27 14:55:58 +02:00
Benoit Marty
2da6ceeb5f Previous code was throw IllegalStateException(), so keep the existing error, even if it should never happen, being compliant with UseCheckOrError detekt rule. 2023-07-27 12:59:16 +02:00
Benoit Marty
8f4b664158 Sync strings. 2023-07-27 12:16:04 +02:00
Benoit Marty
56614da071 Fix lint false positive. 2023-07-27 11:50:16 +02:00
Benoit Marty
3c0a81c416 Ignore unused integer resources. 2023-07-27 11:44:40 +02:00
Benoit Marty
4cdc0c1280 Ignore unused generated resource for Firebase. 2023-07-27 11:41:35 +02:00
Benoit Marty
908471cd51 Remove other unused resource. 2023-07-27 11:41:10 +02:00
Benoit Marty
40bbf1970c Remove unused strings. 2023-07-27 11:32:47 +02:00
Benoit Marty
bbf8a86524 Remove unused drawables. 2023-07-27 11:32:39 +02:00
Jorge Martin Espinosa
dbec1a0a60
Improve fetch members performance, relax regexes for validating ids (#964)
* Fetched `RoomMembers` are mapped in parallel

* Add horizontal padding to room/user name in room details screen

* Relax User & Event id regex matches

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-07-26 16:31:26 +02:00
Jorge Martin Espinosa
05f7037939
Prepare update to Rust SDK 0.1.36 (#966)
* Update to Rust SDK 0.1.36

* Cancel fetching members when the we exit the room
2023-07-26 14:22:09 +00:00
Benoit Marty
9211a33ad8 Add missing preview. 2023-07-26 14:01:23 +02:00
Benoit Marty
495d6020ad Enable detekt rules UseLet and fix existing issues. 2023-07-26 12:12:07 +02:00
Benoit Marty
b8281052b9 Enable detekt rules UseDataClass and fix existing issues. 2023-07-26 11:51:17 +02:00
Benoit Marty
b3cf0d2cf1 Enable detekt rules UnderscoresInNumericLiterals and fix existing issues. 2023-07-26 11:48:08 +02:00
Benoit Marty
f7536a5450 Enable more detekt rules and remove unused extension. 2023-07-26 11:25:05 +02:00