Commit Graph

509 Commits

Author SHA1 Message Date
Benoit Marty
b9df8f969a Make PushData.clientSecret mandatory.
Also do not restore the last session as a fallback, it can lead to error in a multi account context, or even when a ghost pusher send a Push.
2025-09-19 08:57:23 +02:00
Benoit Marty
595cec7d33 Merge branch 'develop' into feature/bma/testEntryPoint 2025-09-18 18:58:30 +02:00
Valere
ac16dda470 fix the tests 2025-09-18 14:32:01 +02:00
Valere
d5983a33c2 fix Conflicting import 2025-09-18 12:25:28 +02:00
Valere
f9fa38f229 refactor: rename CallNotify to RtcNotification to match new event 2025-09-18 09:25:13 +02:00
Valere
ac7e1d6dc3 fix test compilation 2025-09-17 15:53:14 +02:00
Valere
5221f0890c Use the new RtcNotification instead of deprecated CallNotify 2025-09-17 15:15:33 +02:00
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
ElementBot
3cf121345a Sync Strings from Localazy (#5349)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-09-15 08:39:59 +02:00
Benoit Marty
2c8329e9ca Use createShortcutId() in the test. 2025-09-09 09:05:39 +02:00
Benoit Marty
6d6cdfc55b Introduce filterBySession() extension 2025-09-09 09:03:06 +02:00
Benoit Marty
a6f3a16d5f Introduce createShortcutId to enforce the same computation of shortcut ids.
Fixes https://github.com/element-hq/element-x-android/pull/5192#discussion_r2326482795
2025-09-09 08:59:57 +02:00
Benoit Marty
ef738a4210 Merge pull request #5192 from frebib/frebib/conversation-notification
Set shortcut ID on received notifications to make them appear as a Conversation
2025-09-09 08:52:32 +02:00
bmarty
676d7f6c8f Sync Strings from Localazy 2025-09-05 07:44:19 +00:00
Jorge Martín
8f09fd62d9 Fixes after rebase 2025-09-04 16:49:21 +02:00
Jorge Martín
dca1c5b516 Remove dagger and anvil dependencies, try to simplify gradle build scripts a bit 2025-09-04 16:49:21 +02:00
Jorge Martín
e06bacbff3 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín
fc3153bd26 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín
92a4b8b66b Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
ElementBot
a43b907275 Sync Strings from Localazy (#5249)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-09-01 12:44:49 +02:00
Jorge Martin Espinosa
2f2e886e9f Handle preference stores corruption by clearing them (#5086)
* Handle preference stores corruption by clearing them:
    - Use the centralised `PreferenceDataStoreFactory` instead of `preferences by`.
    - Add `DefaultPreferencesCorruptionHandlerFactory.replaceWithEmpty` to its `create(name)` method so all preference stores are cleared if they're corrupted.

* Add detekt rule to make sure we use `PreferenceDataStoreFactory` instead of `by preferencesDataStore`

* Remove `@SingleIn` annotations as the annotated class no longer have to be singletons
2025-08-22 06:59:06 +00:00
Joe Groocock
af932ea6be Set shortcut ID on received notifications
This is the missing piece for Android to treat a notification as a
"conversation". Note that this requires shortcuts to have already been
created prior to receiving the notification.

Signed-off-by: Joe Groocock <me@frebib.net>
2025-08-20 21:20:30 +00:00
Jorge Martin Espinosa
59a8aaebff Add shortcut suggestions for rooms, remove then when leaving (#5180)
* Report shortcut usage for outgoing messages

This patch adds support for creating and pushing dynamic
long-lived shortcuts for outgoing messages. This together
with an existing reference to the roomId used by the
shortcuts as an identifer allows conversations to be
prioritized.

See https://developer.android.com/training/sharing/direct-share-targets#report-usage-outgoing

* Simplify how to get the other user in a DM room

* Add initial avatar icons to shortcuts

* Remove room shortcuts when they're no longer joined

* Try using API 33 for the new tests. They worked locally with API 30, so it's weird the CI asks for a higher API version.

* Add observers for the pin code and session logout states. With this we can prevent new shortcuts from being created and remove existing ones when needed.

* Wrap all calls to `ShortcutManagerCompat` with `runCatchingExceptions` to avoid crashes

* Make `DefaultNotificationConversationService` a singleton.

---------

Co-authored-by: networkException <git@nwex.de>
Co-authored-by: ElementBot <android@element.io>
2025-08-19 16:02:51 +02:00
ElementBot
a4cee52815 Sync Strings from Localazy (#5178)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-08-18 11:09:27 +02:00
ElementBot
badbc5189e Sync Strings (#5146)
* Sync Strings from Localazy

* Remove unused WelcomeView.

* Remove unused WelcomeView.

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-08-11 12:49:29 +00:00
Benoit Marty
aae24e01ef Sync string again 2025-08-04 14:50:08 +02:00
bmarty
a2c8107b44 Sync Strings from Localazy 2025-08-04 00:34:11 +00:00
Jorge Martin Espinosa
9509ad5170 Fix crash when trying to get active notifications (#5085)
Sometimes something goes wrong when unmarshalling them
2025-07-29 15:40:58 +02:00
bmarty
0d0e958bd4 Sync Strings from Localazy 2025-07-28 00:33:43 +00:00
renovate[bot]
58e1503e61 Update dependency org.matrix.rustcomponents:sdk-android to v25.7.23 (#5073)
* Update dependency org.matrix.rustcomponents:sdk-android to v25.7.23

* Adapt to SDK changes:

- Add 'creator' role, adapt existing logic to it.
- Remove `ReplyParameters`, replace with `EventId` where possible.
- Fix changes in OIDC auth methods.
- Add more join rules.

* Make sure both creators and users with power level >= 150 are displayed as 'owners' in the room member list.

* Don't close the roles and permissions screen if the user is a creator

* Use `MediaPreviewValue.DEFAULT` for `MediaPreviewConfig.DEFAULT` too

* Improve APIs around checking roles and power levels:
    - Ensure `RoomInfo.RoomPowerLevels.users` can't be directly used to check power levels since it can't check the power levels for creators.
    - Add a few helper functions to handle actions that relied on the previous `users` property, and docs to explain their usages.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-07-24 11:58:30 +02:00
Jorge Martin Espinosa
b50e5430cb Add fallback notifications from UTDs to the push history (#5047) 2025-07-23 08:55:41 +02:00
bmarty
06312b2e4a Sync Strings from Localazy 2025-07-22 20:46:13 +02:00
renovate[bot]
04a1c00b94 Update dependency org.matrix.rustcomponents:sdk-android to v25.7.7 (#4989)
Make sure we distinguish between notification events that were filtered out and those that couldn't be resolved.

---

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2025-07-07 17:56:51 +02:00
ElementBot
1944004409 Sync Strings from Localazy (#4983)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-07-04 14:37:59 +00:00
ganfra
341ae17b72 Merge branch 'develop' into feature/fga/csam_preferences_server 2025-07-01 09:50:48 +02:00
ganfra
9663e4ef37 Merge branch 'develop' into feature/fga/csam_preferences_server 2025-06-30 21:42:06 +02:00
ganfra
4734b560f7 change (media preview config) : final refactoring and tests 2025-06-30 21:31:58 +02:00
Benoit Marty
d09c1492c3 Fix test regression on API 33. 2025-06-30 17:01:03 +02:00
bmarty
2e8f8ec057 Sync Strings from Localazy 2025-06-30 00:33:54 +00:00
ganfra
0b748aa8cb change (media preview config) : use the new apis 2025-06-26 20:52:44 +02:00
Jorge Martin Espinosa
9c6aa97818 Simplify syncing the room list when receiving a push (#4915) 2025-06-24 10:24:05 +02:00
Benoit Marty
91279d6f0a Update wording of generic notification. 2025-06-18 18:00:50 +02:00
Benoit Marty
af68176dbe Add missing test for UnableToResolve case. 2025-06-18 14:27:28 +02:00
Benoit Marty
5054164379 Fix test after wording change. 2025-06-18 14:19:57 +02:00
Benoit Marty
5c105c0b47 Remove string duplication 2025-06-17 16:55:03 +02:00
Benoit Marty
9c16f9b161 Add missing unit test on DefaultPushService 2025-06-17 16:38:56 +02:00
Benoit Marty
d8095faa43 Ensure that the battery optimization banner is not displayed after an internal clear cache. 2025-06-17 16:31:35 +02:00
Benoit Marty
c61b118f42 Update wording of notification_fallback_content (from localazy) 2025-06-17 16:15:49 +02:00
Benoit Marty
5852558681 Notification: ensure that a notification is displayed when a Push cannot be resolved.
Previously the error was logged and added to push history but no notification was shown, so the user fully miss the new message.
2025-06-17 16:00:31 +02:00
Benoit Marty
72247a3047 Merge pull request #4845 from element-hq/feature/bma/batteryOptimization
Add a banner to ask the user to disable battery optimization when Event cannot be resolved from Push
2025-06-16 11:19:15 +02:00