Commit Graph

111 Commits

Author SHA1 Message Date
Benoit Marty
1292da2a72 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
b748fcc631 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
0a0224b586 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Jorge Martin Espinosa
04f70c8130 Enable SyncNotificationsWithWorkManager by default in release mode apps too (#5646) 2025-10-31 16:25:36 +01: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
c962201722 Merge pull request #5557 from element-hq/feature/bma/sortFF
Sort feature flags
2025-10-17 15:26:39 +02:00
Benoit Marty
6e722a2998 Fix typo. 2025-10-17 14:52:06 +02:00
Benoit Marty
b7ac322d18 Improve FeatureFlagService API. 2025-10-17 12:38:49 +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
0659174735 Add Labs screen for beta testing of public features (#5465)
* Add Labs screen:

- Make `Feature` have an `isInLabs` boolean to distinguish private feature flags from public ones.
- Have `FeatureFlagsService` provide the list of available flags.
- Display the labs item in the settings screen only if there are available public features.
- Remove public feature toggles from developer options.
- Implement the labs screen with the public features.
- Add a clear cache step to the threads feature toggle
- Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-10-07 10:02:54 +00:00
Benoit Marty
5e5548aee7 Enable Spaces by default. 2025-10-06 11:06:08 +02:00
Benoit Marty
73a6ba2849 Multi accounts - experimental first implementation (#5285)
* Multi account - Do not reset analytics store on sign out.

Else when 1 of many accounts is removed, the analytics opt in screen is displayed again.

* Multi accounts - first implementation.

* Multi accounts - Prevent user from logging twice with the same account

* Multi accounts - ignore automatic GoBack in case of error.

* Multi accounts - update first view when adding an account.

* Rename method storeData to addSession.

* Multi accounts - handle account switch when coming from a notification

* Multi accounts - handle login link when there is already an account.

* Multi accounts - handle click on push history for not current account.

* Multi accounts - improve layout and add preview.

* Add accountselect modules

* Multi accounts - incoming share with account selection

* Multi accounts - check the feature flag before allowing login using login link.

* Multi accounts - swipe on account icon

* Cleanup

* Multi accounts - fix other implementation of SessionStore

* Multi accounts - fix PreferencesRootPresenterTest

* Multi accounts - Add test on AccountSelectPresenter

* Multi accounts - Fix test on HomePresenter - WIP

* Update database to be able to sort accounts by creation date.

* Add unit test on takeCurrentUserWithNeighbors

* Fix test and improve code.

* Add exception

* Multi accounts - handle permalink

* Code quality

* Multi accounts - localization

* Fix issue after rebase on develop

* Fix issue after rebase on develop

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Update Multi accounts flag details.

* Add missing test on DatabaseSessionStore

* Add missing preview on LoginModeView

* Remove dead code.

* Add missing preview on PushHistoryView

* Document API.

* Rename API and update test.

* Remove MatrixAuthenticationService.loggedInStateFlow()

* Update screenshots

* Remove unused import

* Add exception

* Fix compilation issue after rebase on develop.

* Update screenshots

* Fix test

* Avoid calling getLatestSession() twice

* Rename `matrixUserAndNeighbors` to `currentUserAndNeighbors`

* Extract code to its own class.

* Add comment to clarify the code.

* Init current user profile with what we now have in the database.

It allows having the cached data (user display name and avatar) when starting the application when no network is available.

* Let the RustMatrixClient update the profile in the session database

* Fix test.

* When logging out from Pin code screen, logout from all the sessions.

tom

* 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.

* Change test in RustMatrixAuthenticationServiceTest

* Do not use MatrixAuthenticationService in RootFlowNode, only use SessionStore

* Remove MatrixAuthenticationService.getLatestSessionId()

* Fix compilation issue after merging develop

* Add test on DefaultAccountSelectEntryPoint

* Fix compilation issue after merging develop

* Introduce LoggedInAccountSwitcherNode, to improve animation when switching between accounts.

* Rename Node to follow naming convention.

* Fix navigation issue after login.

* Remove unused import

* Revert "Fix navigation issue after login."

This reverts commit e409630856d7a7e741548016d7afe174ff1b40f7.

* Revert "Rename Node to follow naming convention."

This reverts commit 883b1f37c7207512d9f6605749977ad9045846a1.

* Revert "Introduce LoggedInAccountSwitcherNode, to improve animation when switching between accounts."

This reverts commit 9c698ff8152aceb5fd2b8b5ab5f609d28de64d24.

* Metro now have `@AssistedInject`.

* Update screenshots

* Introduce DelegateTransitionHandler and use it in RootFlowNode

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: ganfra <francoisg@element.io>
2025-09-26 15:45:06 +02:00
Strac Consulting Engineers Pty Ltd
c45a1ca842 Spelling correction in Update FeatureFlags.kt (#5232)
Spelling correction L74 (flog to flag)
2025-08-27 11:31:28 +02:00
Jorge Martin Espinosa
e9f065c479 Allow replying to any remote message in a thread (#5201)
* Allow replying to any remote message in a thread.

This will open the thread screen based on the selected event:

- If it was already part of a thread, it will open that thread.
- Otherwise, it'll open the thread timeline screen so you can start a thread from the event.

* Add the feature flag to decide which action to perform. Also, rename the feature flag to something easier to understand.

* Display the reply in thread action based on the feature flag too

---------

Co-authored-by: ElementBot <android@element.io>
2025-08-22 16:07:13 +02:00
Jorge Martin Espinosa
285066c206 Threads - first iteration (#5165)
* Initial threads support: parse `ThreadSummary`.

Replace several `isThreaded` values with `EventThreadInfo`, which contains the info about the event either being the root of a thread or part of it.

* Add `Threaded` timeline mode

* Add a `liveTimeline` parameter to `TimelineController`'s  constructor. This way we can customise which timeline will be used as the 'live' one. Also add `@LiveTimeline` DI qualifier for the actual live timeline of the room.

* Create `ThreadedMessagesNode`. Allow opening a thread in a separate screen.

* Add the callbacks for the list menu actions - even if they're the wrong ones and will send the data to the room instead

* Send attachments and location in threads

* Fix polls in threads, add support for sending voice messages in threads

* Display thread summaries only when the feature flag is enabled

* Use 'Reply' instead of 'Reply in thread' when in threaded timeline mode

* Remove incorrect usage of `Timeline` in `MessageComposerPresenter`. This led to replies to threaded events not appearing as actual replies.

---------

Co-authored-by: ElementBot <android@element.io>
2025-08-19 13:35:48 +00:00
Benoit Marty
a282ca26c9 Revert "Remove FeatureFlag.SyncOnPush"
This reverts commit 45150de5b3.
2025-08-12 17:16:49 +02:00
Benoit Marty
8b511ca48a Remove FeatureFlag.SharePos 2025-08-12 16:08:48 +02:00
Benoit Marty
45150de5b3 Remove FeatureFlag.SyncOnPush 2025-08-12 16:08:47 +02:00
Benoit Marty
ebecc6652b Remove FeatureFlag.MediaUploadOnSendQueue 2025-08-12 16:08:46 +02:00
Benoit Marty
d025ae63ee Remove FeatureFlag.MediaCaptionCreation and FeatureFlag.MediaCaptionWarning 2025-08-12 16:08:45 +02:00
Benoit Marty
a0629d03fd Remove FeatureFlag.MediaGallery 2025-08-12 16:08:45 +02:00
Benoit Marty
3a14fcdc0d Remove FeatureFlag.PinnedEvents 2025-08-12 16:08:44 +02:00
Benoit Marty
c42ae056f2 Remove FeatureFlag.QrCodeLogin 2025-08-12 16:08:43 +02:00
Benoit Marty
fe8009e6bf Remove FeatureFlag.MarkAsUnread 2025-08-12 16:08:42 +02:00
Benoit Marty
be4e52e6ec Remove FeatureFlag.VoiceMessages 2025-08-12 16:08:41 +02:00
Benoit Marty
0eadf275e1 Remove FeatureFlag.NotificationSettings and FeatureFlag.PinUnlock 2025-08-12 16:08:40 +02:00
Benoit Marty
92990b27f3 Remove FeatureFlag.LocationSharing and FeatureFlag.Polls 2025-08-12 16:08:38 +02:00
Benoit Marty
4192633930 Remove FeatureFlag.IncomingShare 2025-08-12 15:52:05 +02:00
Jorge Martin Espinosa
a170d80cb3 Add media file limit size warning and media quality selection (#5131)
* Add `VideoCompressorPreset` enum

This represents the different compression presets used for processing videos before uploading them

* Add `VideoCompressorHelper` util class to calculate the scaled output size of the video given an input size and its optimal bitrate

Also add `MediaOptimizationConfig` which will be used to decide how to apply compression in `MediaPreProcessor`

* Add `RustMatrixClient.getMaxFileUploadSize()` function and `MaxUploadSizeProvider` so we can import only this functionality into other components

* Try preloading the max file upload size the first time we get network connectivity - it's a best effort

This should help ensure we'll have this value available later, even if we still need to load it asynchronously.

* Split the `compressMedia` preference into `compressImages` and `compressMediaPreset`

* Modify the media processing parts to use the new classes and utils

* Add `MediaOptimizationSelectorPresenter`, which will retrieve the compression values and the max file upload size, also estimating the compressed video file sizes if needed.

* Add a feature flag to allow selecting the media upload quality per upload

* Integrate the previous changes with the attachments preview screen

Add strings from localazy too.

* Adapt the rest of the app calls to upload media to using the media optimization configs

* Allow modifying the default compression values in advanced settings, based on the feature flag value

* Pass the `fileSize` in `MediaUploadInfo` too, to be able to check it against the `maxUploadSize`

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-08-11 17:22:46 +02:00
ganfra
217f0f3dd6 misc : re-enable share pos by default 2025-08-01 10:31:20 +02:00
ganfra
cbb07217f5 feature (media send queue) : enable send queue by default and hide from dev settings 2025-07-30 22:09:16 +02:00
Jorge Martin Espinosa
b618395f42 Add a feature flag to reuse the last pos value for initial syncs (#5010) 2025-07-10 13:33:23 +00:00
Benoit Marty
aca27093e1 Add Feature flag for Spaces 2025-06-30 17:12:44 +02:00
Richard van der Hoff
9be05262e2 Add a developer option for history sharing on invite (#4821)
Adds a new developer flag, enabling our experimental support for MSC4268.
2025-06-18 17:11:57 +01:00
Jorge Martin Espinosa
44d77a6048 Remove event cache feature flag (#4719) 2025-05-15 09:42:18 +02:00
ganfra
c2568f84d2 Feature : Report room (#4654)
* feature (report room) : introduce all presentation classes.

* feature (report room) : branch entry point in the room list

* refactor (matrix ui) : move some code from appnav to matrix ui

* feature (report room) : add api on room

* feature (report room) : adjust ui

* feature (report room) : branch api

* feature (decline invite and block) : move things around and introduce presentation classes

* feature (decline invite and block) : continue to move things

* feature (report room) : remove reference to "conversation" for now

* feature (report room) : add report room action to room detail screen

* feature (report room) : enabled button state

* feature (report room) : improve code and reuse

* feature (report room) : add feature flag

* feature (report room) : change feature flag to static bool

* feature (report room) : add tests

* feature (report room) : fix ui with new api on ListItem

* feature (report room) : clean up and add more tests.

* Update screenshots

* feature (report room) : more test and fix issue

* feature (report room) : update strings

* feature (report room) : fix konsist preview

* feature (report room) : disable feature

* Update screenshots

* var -> val

* Improve preview of AcceptDeclineInviteView

* Improve preview consistency

* Add missing test on DismissErrorAndHideContent

* Update screenshots

* Add missing tests

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-02 12:25:19 +02:00
ganfra
d2b6014b5e change (composer suggestions) : remove feature flag 2025-03-26 21:46:23 +01:00
Jorge Martín
cb5dcf9b79 Use a feature flag to decide whether logs should be printed to logcat or not
This is done so it can be temporarily enabled on release builds for quick debugging sessions, then disabled again.
2025-03-13 16:11:53 +01:00
Benoit Marty
3522a4fdbf Enable the Event cache by default.
Note that it will not enable it if the user has explicitly disabled it.
2025-03-06 10:38:05 +01:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
Benoit Marty
6c104c0602 Enable MediaGallery in prod. 2024-12-19 16:39:23 +01:00
Benoit Marty
b2dce57abe Add a feature flag for the event cache. 2024-12-12 11:40:53 +01:00
Benoit Marty
28725a364f Media Gallery 2024-12-09 16:48:48 +01:00
Benoit Marty
0fcc90f64f Add warning when adding a caption. 2024-12-02 15:53:48 +01:00
Benoit Marty
933173b934 Add feature flag to temporary disable sending caption by default in production. 2024-11-27 10:54:20 +01:00
renovate[bot]
9042ed6458 Update dependency org.matrix.rustcomponents:sdk-android to v0.2.60 (#3827)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.60

* Fix SDK API breaks:

- Map new `QueueWedgeError` cases.
- Add `MediaUploadOnSendQueue` feature flag enabled on debug and nightly builds: this will by used by `Timeline.send*` media functions fot its new `useSendQueue` parameter.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-11-07 15:25:55 +01:00
ganfra
5255b03aca create room : add Knock feature flag 2024-11-04 15:41:14 +01:00
Andy Balaam
83dcac3c87 Enable identity pinning violation notifications unconditionally
(Remove the feature flag we added when this feature seemed unstable.)
2024-10-28 11:40:47 +00:00
Benoit Marty
928ab08925 Add missing import 2024-10-10 20:35:12 +02:00
Benoit Marty
354349df19 Merge pull request #3648 from element-hq/feature/bma/identityChangeFeatureFlag
Add feature flag IdentityPinningViolationNotifications.
2024-10-10 17:20:29 +02:00