Commit Graph

166 Commits

Author SHA1 Message Date
Benoit Marty
a77662421c Add support for slash commands (under Feature Flag) (#6482)
* Add support for slash commands

* Update screenshots

* Rename module `slash` to `slashcommands`

* Rename `SlashCommand` to `SlashCommandService`

* Introduce MsgType in order to send text message with a different msgtype value.

* Format file and add parameter names, add default values and cleanup

* Add isSupported parameter to filter out unsupported yet commands.

* Slash commands: disable suggestions if the feature is disabled.

* Fix sending shrug command.

* Add missing test on SuggestionsProcessor

* Add tests on MessageComposerPresenter about slash command.

* Fix import ordering

* Add missing tests on CommandExecutor

* Add missing tests in MarkdownTextEditorStateTest

* Slash commands: Improve code when sending message with prefix.

* Slash commands: Add support for /unflip

---------

Co-authored-by: ElementBot <android@element.io>
2026-04-02 16:15:32 +02:00
Jorge Martin Espinosa
b340e85f83 Add floating/sticky date badge in the timeline (#6496)
* Add floating date indicator while scrolling the timeline (#6433)

* Add `FeatureFlags.FloatingDateBadge`. This enables displaying the floating date badge in the timeline as you scroll.

* Don't display the floating badge if the timeline isn't reversed. Otherwise, this will affect talkback users and break the existing navigation

* Use `TimelineItem.formattedDate()` to get the date to display. Always try finding the closest one (usually it will be just the 1st one we try).

* Align designs with iOS. Also fix shadows in fade animation by adding some paddings.

* Update screenshots

---------

Co-authored-by: Gianluca Iavicoli <gianluca.iavicoli04@gmail.com>
Co-authored-by: ElementBot <android@element.io>
2026-04-01 10:45:57 +00:00
ganfra
81c7656125 Merge branch 'develop' into feature/fga/live_location_sharing_setup 2026-03-12 12:48:55 +01:00
Jorge Martin Espinosa
f77098ed47 Add network constraints for fetching notifications with WorkManager (#6305)
* Add `isNetworkBlocked` and `isInAirGappedEnvironment` to `NetworkMonitor`.

* Improve the DI of `SyncPendingNotificationsRequestBuilder` to simplify its usage.

* Only update `isInAirGappedEnvironment` in `DefaultNetworkManager` if the current build is an enterprise one.

* Add network constraints to `DefaultSyncPendingNotificationsRequestBuilder` based on the air-gapped status.

* Add a feature flag to disable the new check, in case it doesn't work as expected.
2026-03-10 12:44:31 +00:00
ganfra
1f5a628b13 Add LiveLocationSharing ff 2026-03-09 20:54:01 +01:00
ganfra
22e9e8d9bd Enable space feature flags by default 2026-02-10 16:33:10 +01:00
ganfra
908616e8e8 Add RoomListSpaceFilters FF 2026-02-02 21:02:55 +01:00
Benoit Marty
017894201c Signin with Element Classic WIP 2026-01-15 11:58:28 +01:00
Jorge Martin Espinosa
03d14087e6 Create spaces (#5982)
* Allow creating a space with `CreateRoomParameters`

* Add 'Create space' menu item in the spaces home screen. Also, imports new strings related to spaces.

* Link the 'Create space' button with the screen to create the space

* Unify room access and visibility for `ConfigureRoom`, use the updated design

* Fix `EditRoomDetails` avatar size (68dp)

* Replace `EditableAvatarView` and `UnsavedAvatar` copmonents with `AvatarPickerView`

* `AvatarDataFetcherFactory`: Make sure we use a fallback image fetcher when the URL is not an MXC one (a local one, i.e.). This removes the previous need for a separate `UnsavedAvatarView`

* Use `AvatarPickerView` in all the screens where `EditableAvatarView` was used

* Improve naming and previews

* Update strings, remove unused ones for `RoomAccessItem`

* Make `isSpace` part of the `CreateRoomConfig`

* Ensure the content fits in the screenshots for `AvatarPickerSizesPreview`

* Add `AvatarDataFetcherFactoryTest`

* Add new feature flag for creating spaces

* Fix ripple being too large for the `Pick` state

* Tweak margins and section titles a bit

* Add preview for `HomeTopBar` with the spaces case

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-01-13 14:35:49 +01:00
ganfra
fd43d58351 change: finished feature flag should fallback to default value 2025-12-22 17:49:41 +01:00
ganfra
9afdbdc4ab Remove FeatureFlags.Space entirely 2025-12-22 17:46:45 +01:00
Benoit Marty
fd446e98dd Link new device using QrCode. 2025-12-16 16:14:04 +01:00
ganfra
b40a98acd5 change : update wording of SpaceSettings ff
Co-authored-by: Benoit Marty <benoitm@element.io>
2025-12-03 17:20:56 +01:00
ganfra
ae3056317d space: SpaceSettings feature flag should be off by default 2025-12-03 11:14:20 +01:00
ganfra
9a081c496f space: add space settings ff and branch it 2025-11-28 14:50:55 +01:00
ganfra
cfa494bd2c space: mark space ff as finished 2025-11-28 14:20:52 +01:00
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
Benoit Marty
f1ad56bef1 Move dependencies block out of the android block. 2025-11-03 22:29:38 +01:00
Jorge Martin Espinosa
04f70c8130 Enable SyncNotificationsWithWorkManager by default in release mode apps too (#5646) 2025-10-31 16:25:36 +01:00
Benoit Marty
826cacf209 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02: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
69aafe9841 Add unit test on DefaultFeaturesProvider. 2025-10-17 14:55:41 +02:00
Benoit Marty
6e722a2998 Fix typo. 2025-10-17 14:52:06 +02:00
Benoit Marty
ba49cfb07c Avoid using volatile FeatureFlags in DefaultFeatureFlagServiceTest 2025-10-17 12:38:55 +02:00
Benoit Marty
a76ab22ed5 Add test on api getAvailableFeatures. 2025-10-17 12:38:54 +02:00
Benoit Marty
09a6ffc081 Improve and fix tests. 2025-10-17 12:38:54 +02:00
Benoit Marty
b7ac322d18 Improve FeatureFlagService API. 2025-10-17 12:38:49 +02:00
Benoit Marty
6854f014b0 Fix warning and also fix bug! 2025-10-17 12:38:48 +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
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +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
f23a493d4c Fix module still using dagger annotation 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
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
Benoit Marty
ef230e3bda Remove dependency to Anvil from modules that do not use it. 2025-08-25 11:36:42 +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
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
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