Commit graph

51 commits

Author SHA1 Message Date
Benoit Marty
eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty
595812fef6 Cleanup 2025-10-23 15:39:23 +02:00
Benoit Marty
263e761907 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty
a575019760 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Jorge Martín
e8328858ab Fixes after rebase 2025-09-04 16:49:21 +02:00
Jorge Martín
de8de61b2e Remove dagger and anvil dependencies, try to simplify gradle build scripts a bit 2025-09-04 16:49:21 +02:00
Jorge Martín
4ab62a6a38 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín
29a97fc0d9 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín
b76a71ebf5 Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Jorge Martin Espinosa
8245ad8bc3
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
Benoit Marty
2fd1c21df0
Let element enterprise be able to configure id for mapTiler. (#4446)
* Let element enterprise configure the ids for maptiler service.

* Disable location sharing and location viewer is the service is not available.

* Fix compilation issue on connected test

* Do not allow to reload the map if the mapId is not available.

* Update screenshots

* Rename file.

* Better to inject a string provider here, so we can unit test DefaultLocationService.

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-21 17:06:52 +01:00
Benoit Marty
97f3be3dc5 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
d97d561b13 Add missing test for DefaultPushService 2024-11-15 15:04:47 +01:00
Benoit Marty
7a7b5d2dd0 Properly unregister from the ntfy app when the user logs out. 2024-11-15 12:43:57 +01:00
Jorge Martin Espinosa
eeec7cc785
Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
e31fc17c9a Add Unit test on UserPushStoreDataStore 2024-06-17 14:48:52 +02:00
Benoit Marty
64930e4435 Add ability to not show the pusher registration again. 2024-06-17 11:38:32 +02:00
Benoit Marty
3fa508f1fe Add Konsist test Class with 'ContributeBinding' annotation should have allowed prefix and fix exissting issues.
Also remove annotation `DefaultPreferences`, we only have one implementation.
2024-05-31 10:18:08 +02:00
Benoit Marty
45598a885e Rename some class from Impl to Default 2024-05-31 09:47:27 +02:00
Benoit Marty
f04253287f Introduce lambdaError instead of using TODO, to handle error when a lambda is invoked and it should not. 2024-05-23 09:12:40 +02:00
Benoit Marty
b38c144f46 Add test on DefaultFirebaseNewTokenHandler 2024-05-22 18:42:39 +02:00
Benoit Marty
90a14ce056 Change to lambda 2024-05-22 18:16:53 +02:00
Benoit Marty
707a530752 Fix wrong package name. 2024-05-22 14:44:35 +02:00
Benoit Marty
08f70b9cfd Move some classes to the test module. 2024-05-22 14:41:14 +02:00
Benoit Marty
505f6d4dae Add test on DefaultPushService 2024-05-22 14:29:35 +02:00
Benoit Marty
a65c290dd3 Improve API, to avoid ignoring errors 2024-05-21 14:45:16 +02:00
Benoit Marty
52c039d676 Rename UserPushStoreFactory.create to UserPushStoreFactory.getOrCreate for code clarity. 2024-04-02 18:12:36 +02:00
Benoit Marty
5ff74fbdff PushClientSecretImpl needs to be a singleton now that it observe the sessions. 2024-01-16 17:33:36 +01:00
Benoit Marty
c821cb5c29 Fix typo 2024-01-16 17:31:26 +01:00
Benoit Marty
4b37ea1a2d Ensure client secret is deleted when the user signs out. 2024-01-16 14:34:06 +01:00
Benoit Marty
40e401c599 Also delete the preference file when the store is reset. 2024-01-16 14:14:04 +01:00
Benoit Marty
8490b0c19d Migrate preferencesDataStoreFile to a file using a hash, to fix a crash if the userId is too long. 2024-01-16 14:13:41 +01:00
Benoit Marty
5d086ad82d Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot]
c8bd362397
Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Marco Romano
79d2941fe4
Include desugaring lib also in library modules (#1604)
## Type of change

- [ ] Feature
- [ ] Bugfix
- [x] Technical
- [ ] Other :

## Content

Includes the `coreLibraryDesugaring(libs.android.desugar)` dependency in all modules which use one of our gradle plugins.

## Motivation and context

Right now desugaring is enabled also in library modules but the desugar dependency is not included in those.
This causes some unwanted side effects such as being unable to run compose previews in an emu.

This change will also include the desugar dependency in those libraries.
2023-10-19 09:00:32 +00:00
David Langley
1260272c33 Add tests, mocks and lint 2023-09-13 12:44:22 +01: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
a6c96af731 Use ConcurrentHashMap to manage synchronization. 2023-07-24 21:53:19 +02:00
Benoit Marty
a2975ec094 Add a test to cover fix of #950 2023-07-24 15:28:36 +02:00
Benoit Marty
94bc2ce53d getOrPut is not thread safe, so ensure that no multiple instance will be created per data store (#950) 2023-07-24 15:01:48 +02:00
Florian Renaud
719dd20555 Remove useless OptIn in tests 2023-05-12 10:05:39 +02:00
Jorge Martin Espinosa
fae3417181 Validate several ids in constructors (#336)
* Validate ids in constructors.

* Remove redundant `.value` usage in string interpolation.

* Make a distinction between `SessionId` and `UserId` in `TestData`.
2023-04-18 16:17:13 +00:00
Jorge Martin Espinosa
de010545fb Update Gradle to 8.1 and AGP to v8.0 (#329)
* Update AGP to 8.0.0.

* Set JAVA_HOME to JDK17

* Update lint version.

* Use right JDK for dependency analysis, replace deprecated env var.

* Upgrade to Gradle 8.1.

* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 08:49:52 +00:00
Benoit Marty
eb6276e09d Improve asXId and make tests pass in release and debug mode. 2023-04-12 09:50:04 +02:00
Benoit Marty
dd71517abe Cleanup store. 2023-04-12 09:50:04 +02:00
Benoit Marty
20370656cd UnifiedPush WIP 2023-04-12 09:50:04 +02:00
Benoit Marty
287fca5438 UnifiedPush WIP 2023-04-12 09:49:23 +02:00