Commit graph

597 commits

Author SHA1 Message Date
Benoit Marty
aab46b3ed6 Use new notification sound in release. 2025-11-17 16:25:17 +01:00
ElementBot
738f707ca7
Sync Strings from Localazy (#5747)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-11-17 10:29:26 +01:00
Benoit Marty
017a259f1c Update notification content 2025-11-14 15:40:31 +01:00
Benoit Marty
6f13feed13 No need for an id, can use ordinal. 2025-11-14 09:38:31 +01:00
Benoit Marty
f1e12c1c1c Do not attempt to restore the pusher after 2 removal in a short time. 2025-11-13 23:15:00 +01:00
Benoit Marty
d3339872ff Ensure that disabling (resp. enabling) notification unregisters (resp. registers) the pusher 2025-11-13 17:50:21 +01:00
Benoit Marty
c7d4689473 Add missing test. 2025-11-13 15:39:20 +01:00
Benoit Marty
0dcd63c7f9 Add unit test on DefaultServiceUnregisteredHandler 2025-11-13 15:13:05 +01:00
Benoit Marty
f9c0b9e8bb UnifiedPush: emit error when registration fails.
Note that I did not manage to have the method `onRegistrationFailed` invoked. If the network is not available for instance, unregistering the previous pusher will fail first.
2025-11-13 14:56:20 +01:00
Benoit Marty
3a3ab4e696 Cleanup NotificationCreator. 2025-11-13 11:59:58 +01:00
Benoit Marty
8c6a7ccac5 Use the method setLargeIcon(Bitmap?) instead of setLargeIcon(Icon?) because it may scale the Bitmap on versions before API 27. Starting in API 27, the framework does this automatically. 2025-11-13 11:41:11 +01:00
Benoit Marty
04589ec091 Fix package name 2025-11-12 12:24:46 +01:00
Benoit Marty
573767aca1 Let notifications use avatar fallback.
Extract code which handles Matrix image to its own api / impl / test modules.
2025-11-12 11:28:42 +01:00
Benoit Marty
eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty
8769b98862
Merge pull request #5698 from element-hq/feature/bma/handleEvent
Code consistency around view event handling
2025-11-10 09:36:04 +01:00
Benoit Marty
7ad9c8f687 Rename handleEvents to handleEvent 2025-11-07 12:21:43 +01:00
Benoit Marty
fd0ef1ae7a Small cleanup 2025-11-06 15:38:41 +01:00
Benoit Marty
ba0c659df1
Merge pull request #5645 from element-hq/feature/bma/mutliAccountNotification
Improve rendering notification for multi account
2025-11-05 18:08:20 +01:00
Benoit Marty
cf742b42d0 Fix test. 2025-11-05 11:47:51 +01:00
Benoit Marty
1d79ab88bd Do not use the bastDescription but the cation for image/video/sticker because else the filename will be rendered in the notification and for media we do not want that.
Also fixes the issue when images is not rendered on some system and so they can be empty notification.

Closes #3945
2025-11-05 11:00:13 +01:00
Benoit Marty
af12ff3c9a Use new SessionStore API 2025-11-04 16:22:16 +01:00
Benoit Marty
1bba0d4dda Merge remote-tracking branch 'origin/develop' into feature/bma/mutliAccountNotification 2025-11-04 16:20:42 +01:00
Benoit Marty
d968d5aff0 Remove unused property 2025-11-04 15:53:50 +01:00
Benoit Marty
be807f4b5c Revert "NotificationDataFactory: improve API"
This reverts commit 7d7ea5d67c.

# 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
d7e328dca7 Need to provide matchingFallbacks 2025-11-03 22:18:50 +01:00
Benoit Marty
776d734557 Use the new notification sound only on debug and night 2025-11-03 19:08:49 +01:00
Benoit Marty
66c8bd8ffb
Revert "Update notification sound" 2025-11-03 18:53:30 +01:00
Benoit Marty
b94d88eaa7 Update notification sound 2025-11-03 14:58:40 +01:00
Benoit Marty
fa55bfe70f Improve code. 2025-10-31 19:15:19 +01:00
Benoit Marty
fed09eeefb Fix test. 2025-10-31 10:10:00 +01:00
Benoit Marty
6cbb679375 Fix issue after rebase. 2025-10-31 10:09:24 +01:00
Benoit Marty
2b98a26694 Remove obsolete TODO 2025-10-31 09:32:41 +01:00
Benoit Marty
e759dca9db Small cleanup 2025-10-31 09:32:40 +01:00
Benoit Marty
674814e322 Move call to setGroup to configureWith 2025-10-31 09:31:57 +01:00
Benoit Marty
3382aa2cfc Use TestScope.backgroundScope 2025-10-31 09:29:48 +01:00
Benoit Marty
04e5d684d4 Let DefaultNotificationDrawerManager use NotificationDisplayer instead of NotificationManagerCompat 2025-10-31 09:29:48 +01:00
Benoit Marty
f4f623c417 Create const for diagnostic tag. 2025-10-31 09:27:35 +01:00
Benoit Marty
6fe85dc579 Use better names for API. 2025-10-31 09:27:34 +01:00
Benoit Marty
7ee00a65d8 Rename OneShotNotification.key to OneShotNotification.tag for clarity. 2025-10-31 09:25:04 +01:00
Benoit Marty
7d7ea5d67c NotificationDataFactory: improve API 2025-10-31 09:25:03 +01:00
Benoit Marty
57ac39673d Notification: show userId in notification when several accounts are configured. 2025-10-31 09:25:01 +01:00
Benoit Marty
be03c50aaf 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
eb08639776
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
eef0fbf4be 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
84d0338ed3
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
b1addb4521
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
9baf948b35
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
a11af0c2b2 Remove element_logo_green.xml from the diagnostic notification. 2025-10-24 17:06:03 +02:00