Commit Graph

239 Commits

Author SHA1 Message Date
Benoit Marty 1c56d95eab Do not render notification if the user has dismiss the notification.
It should not change anything, just avoid doing useless notification rendering.
2023-09-15 15:42:55 +02:00
Benoit Marty 60104822cd Notification: log roomId and eventId 2023-09-15 14:45:46 +02:00
ganfra b382993cbb Sync Strings from Localazy 2023-09-14 14:38:49 +00:00
David Langley c3fbac4678 Merge branch 'develop' of https://github.com/vector-im/element-x-android into dla/feature/connect_sdk_to_global_notifications_ui 2023-09-12 16:30:36 +01:00
renovate[bot] 04c82aa1a5 Update core to v1.12.0 (#1242)
* Update core to v1.12.0

* Fixed now nullable `PendingIntent` creation

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-09-12 12:00:29 +02:00
David Langley a0ac324e3f Implement Notification Settings
- Add UI and logic to inform the user of mismatched notification settings and help them correct it.
- Display a warning when the system notification settings are disabled and a link out to the app settings.
- A toggle to disable notifications for the device
- A screen for editing the group and direct chat notification defaults.
- A toggle for switching on/off atRoom and call notifications.
2023-09-12 01:11:13 +01:00
Benoit Marty 128c4a7b09 SDK 0.1.49: notification decryption is now fully handled by the Rust SDK. (#1231)
* Revert "Ensure the sync is started when receiving a Push, to ensure that the encryption loop is running."

This reverts commit 82f6f358a7.

* Integrate SDK from https://github.com/matrix-org/matrix-rust-sdk/pull/2505

* Enable retryDecryption() on the NotificationClient.

* SDK 0.1.49 - Encryption Sync is enabled by default now, and retryDecryption is the default too.

* Remove feature flag `UseEncryptionSync`

* Fix sample project build

* Exclude `DeveloperSettingsPresenter` from kover verification.

* Add changelog

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2023-09-06 11:33:36 +02:00
Benoit Marty 82f6f358a7 Ensure the sync is started when receiving a Push, to ensure that the encryption loop is running.
Fixes notification with endecrypted content (#1178)
2023-09-04 12:50:37 +02:00
renovate[bot] bb75539647 Update kotlin to 1.9.10 (#1123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-30 08:28:06 +02:00
Benoit Marty 55255735d7 Merge branch 'develop' into feature/bma/dataObject 2023-08-28 10:56:02 +02:00
Benoit Marty 8415826a97 Import strings with Localazy. 2023-08-25 12:15:06 +02:00
Benoit Marty 7083abcf09 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
renovate[bot] 4a630f141d Update kotlin - TO BE MERGED AFTER THE RELEASE (#789)
* Update kotlin

* Update kotlinc.xml

* Update ksp

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Romano <marcor@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-08-17 08:58:10 +00:00
ElementBot 38a25dc3e9 Sync Strings from Localazy (#1032)
Co-authored-by: Florian14 <Florian14@users.noreply.github.com>
2023-08-11 14:34:05 +00:00
Jorge Martin Espinosa 2131af28d5 Enable filter push notifications by push rules (#1041)
* Enable filter push notifications by push rules

* Remove unused `filterByPushRules` parameter

* Use fallback notification only for items not filetered by the push rules

* Fix tests
2023-08-09 12:12:39 +00: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 908471cd51 Remove other unused resource. 2023-07-27 11:41:10 +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 495d6020ad Enable detekt rules UseLet and fix existing issues. 2023-07-26 12:12:07 +02:00
Benoit Marty b3cf0d2cf1 Enable detekt rules UnderscoresInNumericLiterals and fix existing issues. 2023-07-26 11:48:08 +02:00
Benoit Marty 1354ec76c9 Enable detekt rules DataClassShouldBeImmutable and fix existing issues. 2023-07-26 11:18:00 +02:00
Benoit Marty 5e2e03f054 Merge branch 'develop' into feature/bma/noWarnings 2023-07-21 12:17:50 +02:00
Benoit Marty c75eabbcb0 Enable detekt rules UnnecessaryParentheses and cleanup the code. 2023-07-20 18:08:08 +02:00
Benoit Marty 86756dbc09 Enable detekt rules UnusedParameter and UnusedPrivateProperty and cleanup the code. 2023-07-20 17:48:56 +02:00
Benoit Marty d7f8aa533e Stop using deprecated LocalBroadcastManager. We will implement the code when we will work on the troubleshoot notification screen. 2023-07-20 17:39:55 +02:00
Benoit Marty c7222e2969 Fix warning (suppress, no sure I want to delete this class right now) 2023-07-20 15:41:44 +02:00
Benoit Marty 0f4af79fb1 Fix warning (comment out dead code due to notification actions not active yet.) 2023-07-20 15:41:09 +02:00
Benoit Marty b072872c85 Fix warning (suppress, no sure I want to delete this class right now) 2023-07-20 15:37:50 +02:00
Benoit Marty 202268ae55 Fix warning (remove dead code) 2023-07-20 15:36:23 +02:00
Benoit Marty 17c7ecd9c2 Clear all notifications of the session when the user signs out. 2023-07-20 14:53:38 +02:00
Marco Romano e7cab7ac1d Make the functions in SystemUtils extensions (#899)
- They are now all extensions over `Context` or `Activity` (when `Context` is not enough) (some of them already were).
- Allows for IDE completion.
2023-07-18 13:11:11 +00:00
Benoit Marty 80cf8e758a Merge branch 'develop' into fix/jme/880-sliding-sync-loop-expires-and-restarts 2023-07-17 22:18:59 +02:00
ganfra 2b679710d2 Rework a bit MatrixClientHolder and reintroduce cacheIndex... 2023-07-17 18:34:50 +02:00
Jorge Martin Espinosa 9247cd765a Fix: make sure we ignore notifications for open rooms (#867)
* Make sure we ignore notifications for open rooms
- Listen to process lifecycle changes in `AppForegroundStateService`. Use initializers to reliable create it.
- Merge `AppNavigationState` with `AppForegroundState`. Renamed the previous `AppNavigationState` to `NavigationState`, created a new `AppNavigationState` which contains both the navigation state and the foreground state.
2023-07-17 17:02:06 +02:00
Jorge Martín e2549a8308 Try to centralise session restoration through MatrixClientsHolder 2023-07-17 15:05:13 +02:00
ElementBot e75438a8e3 Sync Strings (#882)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: bmarty <bmarty@users.noreply.github.com>
2023-07-17 10:22:15 +02:00
Jorge Martín 0632d01d86 Fix sliding sync loop restarts due to expirations
Both `NotifiableEventResolver` and `DefaultNotificationDrawerManager` were creating new Rust SDK Clients while processing notifications instead of reusing the already existing one.
2023-07-17 08:05:12 +02:00
Jorge Martin Espinosa 494229d153 Set right timestamp for fallback notifications (#864) 2023-07-13 06:02:38 +00:00
Benoit Marty 86a2c340ee Ensure pending intent data are unique. 2023-07-12 17:28:53 +02:00
Benoit Marty 92f5c96936 Use the param (bad copy paste) 2023-07-12 14:14:44 +02:00
Jorge Martin Espinosa a0c1f2c18a Display room invitation notification (#735)
* Notifications: Add some extra mappings so we keep the original contents and can pass it later to an UI layer

* Fix notifications not appearing for a room if the app was on that room when it went to background.

* Modernize how we create spannable strings for notifications, remove unneeded dependency

* Remove actions from invite notifications temporarily

* Add `NotificationDrawerManager` interface to be able to clear membership notifications when accepting or rejecting a room invite

* Fix tests

* Add comment to clarify some weird behaviours

* Address review comments

* Set circle shape for `largeBitmap` in message notifications

* Fix no avatar in DM rooms

* Fix rebase issues

* Add invite list pending intent:

- Refactor pending intents.
- Make `DeepLinkData` a sealed interface.
- Fix and add tests.

* Rename `navigate__` functions to `attach__`

* Add an extra test case for the `InviteList` deep link

* Address most review comments.

* Fix rebase issue

* Add fallback notification type, allow dismissing invite notifications.

Fallback notifications have a different underlying type and can be dismissed at will.

* Fix tests
2023-07-10 14:34:58 +02:00
bmarty 6e54ed7b77 Sync Strings from Localazy 2023-07-03 00:11:17 +00:00
renovate[bot] d6780b1107 Update kotlin 2023-06-28 22:23:44 +00:00
renovate[bot] 32332deaf4 Update dependency org.matrix.rustcomponents:sdk-android to v0.1.24 (#675)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.24

* Add new `filterByPushRules`.
Only existing usage of this API will set this param to `true` in order to not change the current behavior.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Romano <marcor@element.io>
2023-06-27 08:29:36 +02:00
bmarty 874739ece9 Sync Strings from Localazy 2023-06-26 00:10:53 +00:00
Benoit Marty f38f1487c5 Merge pull request #626 from vector-im/feature/bma/sonar
Sonar
2023-06-21 10:41:26 +02:00
github-actions[bot] fe5524bae4 Sync Strings (#630)
* Sync Strings from Localazy

* Update strings, remove broken German translation

* Update screenshots

---------

Co-authored-by: bmarty <bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-19 11:18:01 +00:00
Benoit Marty 2452d8aa91 Fix the 6 issues reported by Sonar. 2023-06-16 18:08:20 +02:00
ganfra 438fc6bb99 Merge branch 'develop' into feature/fga/media_viewer_actions 2023-06-06 14:35:25 +02:00
github-actions[bot] 044a3c991e Sync Strings (#522)
Sync Strings from Localazy
2023-06-05 15:26:50 +00:00