Commit Graph

562 Commits

Author SHA1 Message Date
Benoit Marty
e96cd9e28f Merge remote-tracking branch 'origin/develop' into feature/bma/mutliAccountNotification 2025-11-04 16:20:42 +01:00
Benoit Marty
16fcc12e93 Remove unused property 2025-11-04 15:53:50 +01:00
Benoit Marty
fb4114adad Revert "NotificationDataFactory: improve API"
This reverts commit b0e5e6cc61.

# Conflicts:
#	libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationDataFactoryTest.kt
2025-11-04 15:43:23 +01:00
Benoit Marty
7a7a625676 Need to provide matchingFallbacks 2025-11-03 22:18:50 +01:00
Benoit Marty
3ab67bf421 Use the new notification sound only on debug and night 2025-11-03 19:08:49 +01:00
Benoit Marty
18e46644ba Revert "Update notification sound" 2025-11-03 18:53:30 +01:00
Benoit Marty
19b0e27ab2 Update notification sound 2025-11-03 14:58:40 +01:00
Benoit Marty
e6934aacfa Improve code. 2025-10-31 19:15:19 +01:00
Benoit Marty
df4853e1f5 Fix test. 2025-10-31 10:10:00 +01:00
Benoit Marty
af2429d8ed Fix issue after rebase. 2025-10-31 10:09:24 +01:00
Benoit Marty
231077d94b Remove obsolete TODO 2025-10-31 09:32:41 +01:00
Benoit Marty
d5fdc5f8e6 Small cleanup 2025-10-31 09:32:40 +01:00
Benoit Marty
947347b3f1 Move call to setGroup to configureWith 2025-10-31 09:31:57 +01:00
Benoit Marty
31ff72b319 Use TestScope.backgroundScope 2025-10-31 09:29:48 +01:00
Benoit Marty
fbecf8d34f Let DefaultNotificationDrawerManager use NotificationDisplayer instead of NotificationManagerCompat 2025-10-31 09:29:48 +01:00
Benoit Marty
55517e5cb1 Create const for diagnostic tag. 2025-10-31 09:27:35 +01:00
Benoit Marty
f0e42a70fb Use better names for API. 2025-10-31 09:27:34 +01:00
Benoit Marty
529c708d7e Rename OneShotNotification.key to OneShotNotification.tag for clarity. 2025-10-31 09:25:04 +01:00
Benoit Marty
b0e5e6cc61 NotificationDataFactory: improve API 2025-10-31 09:25:03 +01:00
Benoit Marty
031ca4f333 Notification: show userId in notification when several accounts are configured. 2025-10-31 09:25:01 +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
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
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
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
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
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
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
Benoit Marty
66d8e6210d Add default implementation to SessionListener 2025-10-23 16:48:20 +02:00
Benoit Marty
44e125dbc7 Add parameter wasLastSession to SessionListener.onSessionDeleted 2025-10-23 16:20:15 +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
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
Benoit Marty
826cacf209 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty
666666a8b6 Fix compilation issue 2025-10-22 18:24:20 +02:00
Jorge Martin Espinosa
4861ae5171 Enable SyncNotificationsWithWorkManager in nightly and debug builds (#5573)
* Enable `SyncNotificationsWithWorkManager` in nightly and debug builds

* Fix tests
2025-10-22 16:55:40 +02:00
Benoit Marty
71c853d1a7 Fix test warning (#5558)
* Introduce JsonProvider.

It will ensure that classes are using the correct Json instances in the unit tests.

* Avoid creating a Json instance many times.

* Update ref.
2025-10-20 12:08:05 +02:00
ElementBot
5f6a93cd1a Sync Strings (#5562)
* Sync Strings from Localazy

* Sync strings again

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-10-20 10:04:46 +00:00
Benoit Marty
241a968d66 Introduce JsonProvider.
It will ensure that classes are using the correct Json instances in the unit tests.
2025-10-20 09:40:42 +02:00
Jorge Martin Espinosa
597c9b473a Sync notifications using WorkManager (#5545)
* Initial implementation of notification sync using `WorkManager`

* Use custom `MetroWorkerFactory` to allow assisted injection in WorkManager Workers

* Add tests for `FetchNotificationWorker`. Create `FakeNotificationResolverQueue` to help testing.

* Add more tests, fix Konsist checks

* Add tests for `SyncNotificationWorkManagerRequest`

* Simplify `FakeNotificationResolverQueue`
2025-10-17 09:51:27 +00:00
Jorge Martin Espinosa
e74ec97ec0 Fix 'test push loop back' notification check (#5541)
Include a fake client secret as the HS would do, since it's now mandatory.
2025-10-15 14:07:18 +02:00
ElementBot
57e8b47683 Sync Strings from Localazy (#5515)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-10-13 08:01:58 +02:00
bmarty
03ae925f2a Sync Strings from Localazy 2025-10-08 10:23:22 +00:00
Benoit Marty
2526141067 Merge pull request #5471 from element-hq/feature/bma/improveUnifiedPushTroubleshotTest
Improve current push provider test: give info about the distributor.
2025-10-07 17:21:54 +02:00
Benoit Marty
cb228d35e9 Fix compilation issue in tests. 2025-10-07 16:49:51 +02:00