Commit Graph

4535 Commits

Author SHA1 Message Date
Benoit Marty
e70d767183 Remove context(parentNode: Node) and provide the parent Node as a parameter. 2025-10-31 12:04:57 +01:00
Benoit Marty
187479849d Create Fake classes in test modules 2025-10-30 18:32:31 +01:00
Benoit Marty
05c5f3c914 Use context parameter for the parentNode 2025-10-30 16:32:53 +01:00
Benoit Marty
566515ca88 Remove NodeBuilder to ensure that Params and Callback are always provided. 2025-10-30 16:32:52 +01:00
Benoit Marty
5197154f54 Ensure a Callback and only one is provided in the Plugin. Also reduce boilerplate code in Nodes. 2025-10-30 16:32:51 +01:00
Benoit Marty
09a18ad7ca Rename fun in Callback for clarity. 2025-10-30 16:32:48 +01:00
Jorge Martin Espinosa
45b5783b23 Display only valid emojis in recent emoji list (#5612)
* Create `:libraries:recentemojis` and move `AddRecentEmoji` and `GetRecentEmojis` there

- Make sure `GetRecentEmojis` won't return duplicate or invalid emojis.
- `ActionListPresenter` now handles merging suggested and recent emojis, not `ActionListView`.
2025-10-30 15:27:51 +00:00
Jorge Martin Espinosa
7facc40771 Split notifications for messages in threads (#5595)
* Separate thread notifications into their own notifications when the feature flag is enabled.

Otherwise, set the `threadId` to null so it'll behave as usual. It's done this way to avoid having to inject `FeatureFlagService` in several places.

* Add permalink navigation to threads from notifications, focusing on the latest event in the list of messages of the notification tapped

* Fix redactions in threads

* Clear notifications for a thread when visiting it

* Fix opening a thread happening twice, first because of the `openThreadId` value, then because of the `focusedEventId` one

* Make opening a room through a notification also focus on the latest event

* Add helper `NotificationCreator.messageTag` function

* Remove unused `ROOM_CALL_NOTIFICATION_ID`: `FOREGROUND_SERVICE_NOTIFICATION_ID`+ `ForegroundServiceType` is used instead

* Simplify `DefaultDeepLinkCreator`

* Make sure the main timeline focuses on the thread root id too when navigating to a thread

* Handle "Mark as read" action for thread notification, using `timeline.markAsRead`

* Log failures to mark rooms as read using the notification action

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-10-30 15:15:00 +00:00
Benoit Marty
0f939f5eff Sadly detekt still needs this. It will be fixed in detekt 2.0.0 2025-10-30 15:01:14 +01:00
Benoit Marty
214a855616 Remove exclusion, ktlint is now able to handle Kotlin context parameter. 2025-10-30 14:33:28 +01:00
Benoit Marty
8bfb86683d Fix "Arrow is redundant when parameter list is empty"
And other issues that ktlint now reports
2025-10-30 14:33:25 +01:00
Benoit Marty
e22ecb68c3 Fix "Backing property is only allowed when a matching property or function exists" 2025-10-30 13:27:19 +01:00
Jorge Martin Espinosa
1f5f6896c6 Fix marking a room as read re-instantiates its timeline (#5628)
* Add `Timeline.markAsRead` to avoid reinstantiating the timeline using `Room.markAsRead`

* Mark as read when exiting the room screen, destroy the timeline when fully closed

* Ensure `MarkAsFullyReadAndExit` event can only be processed once

* Fix `DelayedVisibility` not being displayed in previews
2025-10-30 08:39:06 +01:00
renovate[bot]
988815217a fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.10.29 (#5625)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.10.29

* Rename `NoPointer` to `NoHandle` for the Rust FFI fakes

* `@Ignore` tests broken by FFI direct mapping

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-10-29 22:56:03 +01:00
Benoit Marty
cc050a1f26 Merge branch 'develop' into feature/bma/mediaForward
# Conflicts:
#	appnav/src/main/kotlin/io/element/android/appnav/room/joined/JoinedRoomLoadedFlowNode.kt
2025-10-29 12:41:58 +01:00
Jorge Martin Espinosa
7ed888af83 Fix issues with WorkManager on Android 12 and below (#5606)
* Add `getForegroundInfo` implementation to try to fix issues with WorkManager on Android 12 and below

This may be a MIUI-only issue as I couldn't reproduce it with several emulators on Android 11, 12 and 13.

* Use `setExpedited` only on Android 13 or higher, it's not needed on older versions

* Use an actual string resource, fix tests

* Fix review comments

* Fix broken test with Element Pro:

Instead of using Robolectric with API < 33 (since Pro uses minSdk 33) use a `BuildVersionSdkIntProvider`

* Remove `getForegroundInfo` and the associated permission, as we expect it to be dead code

* Fix lint issues

* Cleanup NotificationIdProvider

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-10-28 20:06:57 +00:00
Benoit Marty
6ae0d67e69 Add missing tests. 2025-10-28 20:28:37 +01:00
Benoit Marty
f5b17d4ddb Remove unused dependency 2025-10-28 18:48:21 +01:00
Benoit Marty
08f75dda4c Confirm exit without saving change in room details edit screen (#5618)
* Room details edit screen: add confirmation dialog when leaving without saving pending changes.

* Improve preview coverage.

* Update screenshots

* Introduce AsyncAction.ConfirmingCancellation and use it for leaving room edition without saving change.

* Fix issue in comment

* Use new `ConfirmingCancellation` object in Change Roles screen

---------

Co-authored-by: ElementBot <android@element.io>
2025-10-28 18:25:51 +01:00
Benoit Marty
700362a266 EventId cannot be null here. 2025-10-28 18:15:25 +01:00
Benoit Marty
21bae4aee2 Add Forward action to MediaDetailsBottomSheet. Closes #5454
Improve API of Callback when forwarding Event.
2025-10-28 18:13:53 +01:00
Jorge Martín
003af22c31 Fix api breaks:
- `ComposerDraft` now takes a list of media attachments.
- `HumanQrLoginException` has a couple of new cases.
- `Client.loginWithQrCode` now returns a `LoginWithQrCodeHandle`, which we need to call using `scan` to have the same behaviour as before.
2025-10-28 17:14:40 +01:00
Benoit Marty
e9cfce915a Extract code for forwarding Event to its own modules. 2025-10-28 15:42:39 +01:00
ElementBot
b2aa6b1622 Sync Strings from Localazy (#5610)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-10-27 13:53:07 +01:00
Benoit Marty
fc9c90181c Merge pull request #5592 from element-hq/feature/bma/constValKey
Improve how data is handled for the WorkManager.
2025-10-24 19:20:44 +02:00
Benoit Marty
bb12a6f18b Merge pull request #5607 from element-hq/feature/bma/notificationStyle
Update notification style
2025-10-24 19:20:18 +02:00
Benoit Marty
06cf6c321e Remove element_logo_green.xml from the diagnostic notification. 2025-10-24 17:06:03 +02:00
Benoit Marty
d8129e72bc Let notifications uses the brandColor. 2025-10-24 17:04:48 +02:00
ganfra
e689eaf73a design(space): let divider be full width
# Conflicts:
#	features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesView.kt
2025-10-24 16:07:16 +02:00
Benoit Marty
8ee422508b Quick reply action: use icon from compound 2025-10-24 13:25:38 +02:00
Benoit Marty
60e46209e6 Accept / reject invitation actions: use icons from compound 2025-10-24 13:23:59 +02:00
Benoit Marty
d0c5abadbd Mark as read: use icon from compound 2025-10-24 13:22:00 +02:00
Benoit Marty
3010f9313b Merge pull request #5600 from element-hq/feature/bma/deletePinCode
Delete pin code only when the last session is deleted
2025-10-24 09:47:57 +02:00
ganfra
6008af36ec Merge pull request #5599 from element-hq/feature/fga/home_topbar_2
Design : update Home TopBar and RoomList Filters
2025-10-23 18:29:40 +02:00
Benoit Marty
5d1696b122 Fix detekt issue. 2025-10-23 18:03:22 +02:00
Benoit Marty
bc8db88a03 Add unit test on DefaultLockScreenService 2025-10-23 17:20:36 +02:00
Benoit Marty
fdc64e9be7 Use TestScope.backgroundScope 2025-10-23 16:48:24 +02:00
Benoit Marty
b8c7e16c50 Add test on wasLastSession value. 2025-10-23 16:48:23 +02:00
Benoit Marty
2d1b4b1ede Rename fixture fun for clarity. 2025-10-23 16:48:22 +02:00
Benoit Marty
66d8e6210d Add default implementation to SessionListener 2025-10-23 16:48:20 +02:00
ganfra
eb2b527236 design(home) : use enterAlwaysScrollBehavior for the RoomListFiltersView 2025-10-23 16:41:43 +02:00
Benoit Marty
44e125dbc7 Add parameter wasLastSession to SessionListener.onSessionDeleted 2025-10-23 16:20:15 +02:00
Benoit Marty
17e69974c7 Cleanup 2025-10-23 15:39:23 +02:00
Benoit Marty
44b5ad48f1 Remove dependency on AppNavigationStateService from DefaultUnifiedPushCurrentUserPushConfigProvider 2025-10-23 15:37:31 +02:00
Benoit Marty
c53dabce16 Remove dependency on AppNavigationStateService from DefaultGetCurrentPushProvider 2025-10-23 15:03:04 +02:00
Benoit Marty
52dffa5418 Merge branch 'develop' into feature/bma/metro070 2025-10-23 11:30:25 +02:00
Benoit Marty
6326d1fc22 Merge pull request #5587 from element-hq/feature/bma/robustWellknown
Improve wellknown retrieval API
2025-10-23 11:28:30 +02:00
Benoit Marty
d3feb237a1 Merge pull request #5588 from element-hq/feature/bma/iconPreviewDuplicate
Remove icon preview duplicate
2025-10-23 10:40:41 +02:00
Benoit Marty
937519639d Add missing test. 2025-10-23 09:59:24 +02:00
Benoit Marty
9983871db7 Introduce WorkerDataConverter to avoid hard coded Json key and ensure serializing/deserializing is performed at the same place. 2025-10-23 09:51:21 +02:00