Commit Graph

505 Commits

Author SHA1 Message Date
Jorge Martín
d373cbe8a7 Create PinnedEventsTimelineProvider, expose it in TimelineBindings 2025-11-03 14:43:18 +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
826cacf209 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty
82c6aca7e5 Move SemanticColorsLightDark to compound module 2025-10-22 09:35:55 +02:00
Benoit Marty
c2c77aad2a Improve API and fix theme glitch when switching between accounts. 2025-10-22 09:32:15 +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
Benoit Marty
0656b5b2c4 Merge remote-tracking branch 'origin/develop' into feature/bma/assetReader 2025-10-16 20:34:38 +02:00
Benoit Marty
276c707e42 Move Json provider from Network module to AppModule to reuse it. 2025-10-16 16:37:08 +02:00
Benoit Marty
8b703ed046 Let the enterprise build be able to update the colors. 2025-10-15 11:25:58 +02:00
renovate[bot]
d551d6fadb fix(deps): update dependency com.squareup.okhttp3:okhttp-bom to v5.2.1 (#5524)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 10:30:06 +00:00
ganfra
250667b5b5 di : clean some code 2025-10-01 10:23:10 +02:00
Jorge Martin Espinosa
f1cd80ede8 Use shared recent emoji reactions from account data (#5402)
* Use shared recent emoji reactions from account data

- Add `AddRecentEmoji` and `GetRecentEmojis` use cases to avoid injecting the whole `MatrixClient` for just one of these operations.
- Update the UI and logic of the emoji picker and message context menu to include the recent emojis.
- Add `CoroutineDispatchers.Default` with the defaults coroutines to use in the app for ease of use.

* Instead of replacing suggested emojis, concatenate recent ones removing duplicates

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-09-26 11:04:34 +00:00
ElementBot
99f956bdc3 Sync Strings from Localazy (#5385)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-09-22 11:19:35 +02:00
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +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
2907cef47e Some cleanup:
- Remove unnecessary `GlobalScope`.
- Rename `Component` to `Graph`, `DaggerComponentOwner` to `DependencyInjectionGraphOwner`.
- Rename component builders to factories, where necessary.
2025-09-04 16:49:21 +02:00
Jorge Martín
36bca71a46 Improve the fix for push notifications and MessagingReceiver being unknown to the DI 2025-09-04 16:49:21 +02:00
Jorge Martín
298fda8bcf Fix push notification bindings 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
Benoit Marty
9daadb384e Do not let default enterprise impl module be implemented for enterprise build. 2025-09-04 13:33:37 +02:00
Benoit Marty
0d4c578108 Improve log to see the build type. 2025-09-04 12:40:25 +02:00
Jorge Martin Espinosa
fa918e3efa Enable largeHeap option (#5258)
This should help with some OOM issues we're seeing when both playing and transcoding video files in the attachment preview screen
2025-09-03 11:06:46 +02:00
Benoit Marty
4daf57ab2d Rename method. 2025-08-25 11:36:43 +02:00
Benoit Marty
2b42271615 Split module deeplink to api and impl. 2025-08-25 11:36:42 +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
Jorge Martin Espinosa
883b62b34c Fix sending videos in API <= 30 (#5186)
This is caused by a bug in the Media3 Transform library: https://github.com/androidx/media/issues/2535
2025-08-19 10:39:03 +02:00
Benoit Marty
4192633930 Remove FeatureFlag.IncomingShare 2025-08-12 15:52:05 +02:00
Benoit Marty
fa779b905e Set appCategory value to "social" in the Android Manifest 2025-08-12 09:57:30 +02:00
Benoit Marty
d7e4e00b5d Let enterprise build be able to override (or disable) the bug report URL. 2025-08-08 17:23:39 +02:00
Benoit Marty
5577d2ca9b Store log files in subfolder based on the homeserver domain. 2025-08-07 11:31:05 +02:00
Jorge Martin Espinosa
955263bee1 Force last owner of a room to pass ownership when leaving (#5094)
* Move `ChangeRoles*` classes to their own module so they can be shared

* Hook the change roles screen to the leave room action, add confirmation dialogs

* Use enum instead of sealed interface for `ChangeRoomMemberRolesListType`

* Try to improve communications between nodes

* refactor (leave room) : makes sure to expose only necessary code from api module

* Add `:libraries:previewutils` module to share some test fixtures used for UI previews

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: ganfra <francoisg@matrix.org>
2025-08-05 17:24:14 +02:00
bmarty
2e8f8ec057 Sync Strings from Localazy 2025-06-30 00:33:54 +00:00
夜坂雅
91b925c3ee feat: Support matrix: links (#4839) 2025-06-09 16:40:45 +02:00
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* Inject the session scope instead of the application scope where it's possible.

* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
2025-06-04 15:33:51 +00:00
Benoit Marty
3ae8d77c9a Add support for Android Auto. (#4818) 2025-06-04 13:00:01 +02:00
Benoit Marty
37344a4f7d Fix mobile link (#4805)
* Fix path of mobile link. Adding a trailing `/`

* Reduce brain pressure.
2025-06-02 16:11:30 +02:00
Lucas
2e2c40b999 fix: exclude more domains from being backed up by the system (#4773)
tries* to fix #3465
2025-06-02 14:17:43 +02:00
ElementBot
498cf15d38 Sync Strings (#4775) 2025-05-30 08:47:39 +00:00
Benoit Marty
819d9c7da0 Update UnifiedPush library (#4358)
* Upgrade `com.github.UnifiedPush:android-connector` from 2.4.0 to 3.0.4

* Do not use jitpack to get the unified push library

* implementation is ok

* Exclude com.google.crypto.tink to fix a compilation issue

* Fix tests.

* Update log.

* Revert "Exclude com.google.crypto.tink to fix a compilation issue"

This reverts commit f431ebe3b78a06282e0ee74c9f428702d463df45.

* Fix compilation issue after rebase.

* Exclude com.google.crypto.tink again.

* Try version 3.0.8

* Use latest version 3.0.9

* Replace tink exclusion with dependency resolution

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2025-05-26 14:56:54 +02:00
Benoit Marty
f20caebdcb Add support for login link (#4752)
* Add support for login link

https://mobile.element.io/element?account_provider=example.org&login_hint=mxid:@alice:example.org

* Update screenshots

* Reduce code duplication

* Add test on OnBoardingPresenter

* Fix tool

* Ignore login parameter if user is not allowed to connect to the provided server.

* Improve tests.

* Cleanup

* Revert change on Project.xml.

* Add documentation

* Improve LoginHelper

* Rename LoginFlow to LoginMode

Move LoginFlow to package io.element.android.features.login.impl.login
Rename some implementation of LoginMode
Rename LoginFlowView to LoginModeView

* Change launchMode of MainActivity from `singleTop` to `singleTask`

Using launchMode singleTask to avoid multiple instances of the Activity when the app is already open. This is important for incoming share and for opening the application from a mobile.element.io link.

Closes #4074

---------

Co-authored-by: ElementBot <android@element.io>
2025-05-21 18:19:42 +02:00
Benoit Marty
9ea4853e88 Improve the callback uri format and customization. (#4664)
* Remove unused SUPPORT_EMAIL_ADDRESS

* Improve the callback uri format and customization.

Use io.element.android for the scheme of Oidc redirection for Element X.
For nightly the scheme will be io.element.android.nightly
For debug the scheme will be  io.element.android.debug

Element Pro is using `io.element`
2025-05-05 17:46:17 +02:00
Jorge Martin Espinosa
c537e94146 Split MatrixRoom into BaseRoom and JoinedRoom (#4561)
`JoinedRoom` will now contain both a mandatory live timeline reference and all the functionality associated to it.

`BaseRoom` on the other hand will contain only functionality that's shared for both joined and not joined rooms.

`NotJoinedRoom` is a wrapper around `RoomPreviewInfo` data and a possible local `BaseRoom`, if it exists.

The `RustRoomFactory` cache is now gone since the persistent event cache should have the same effect.
2025-04-23 15:53:40 +02:00