Commit Graph

245 Commits

Author SHA1 Message Date
Benoit Marty
72b89338b3 Remove Modifier parameter in private function when only default value is used.
This will improve the code coverage metrics, and this also fixes a few potential bug, where the Modifier was used several times.
2024-02-08 11:06:06 +01:00
Jorge Martin Espinosa
38fdef0388 Fix crash about several DataStores using the same file (#2312)
* Fix crash about several DataStores using the same file

- Create `@SessionCoroutineScope` annotation to pass a session-managed coroutine scope to the DI.
- Expose this scope from `MatrixClient`.
- Rework DataStore file creation a bit.
- Centralise session preference creation through `DefaultSessionPreferencesStoreFactory` until we figure out what went wrong with the scoping
2024-01-30 11:10:46 +01:00
Jorge Martin Espinosa
17f22d143b Add 'send private read receipts' option in advanced settings (#2290)
* Add 'send private read receipts' option in advanced settings
* Create `SessionPreferencesStore` that stores the settings for the current use separate from those of the app.
* Rename `PreferencesStore` to `AppPreferencesStore` to split the preferences.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-26 10:06:26 +01:00
Jorge Martin Espinosa
e22ac6a48d Add a special tracing configuration for nightlies (#2297)
It also enables logging `MATRIX_SDK_BASE_READ_RECEIPTS` at a `TRACE` level for both debug and nightly versions.
2024-01-26 10:05:30 +01:00
Benoit Marty
f47b9827c5 Restore branch and git sha, to use it in logs and in rageshakes.
Remove quite useless `gitRevisionDate`.
2024-01-25 14:16:21 +01:00
Benoit Marty
207df5b648 Log the flavor 2024-01-25 12:25:42 +01:00
Benoit Marty
e4ef00908b Create gplay and fdroid variant 2024-01-11 21:42:04 +01:00
Benoit Marty
d3830af78b Fix ktlint issues 2024-01-10 19:33:39 +01:00
renovate[bot]
7e9cda3aa9 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
Benoit Marty
ed64403dec Send the tracing configuration with the rageshake data. 2023-12-06 17:36:13 +01:00
Marco Romano
c69d610b6c Rename params in NodeFactories for clarity (#1916)
- `context` is now `buildContext` to reflect that it's of type `BuildContext` (and not an android `Context`).
- `NODE` generic type param is now `N` to stick with Java convention: https://docs.oracle.com/javase/tutorial/java/generics/types.html.
2023-11-29 10:01:07 +01:00
Jorge Martin Espinosa
a8b85fb4e6 Extract compound tokens and theming to compound-android library (#1888)
* Replace tokens & icons with the external Compound ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-27 10:30:07 +01:00
Benoit Marty
3c4629e74c Add test for IntentProviderImpl 2023-11-24 09:56:45 +01:00
Benoit Marty
b7796e0125 Let the user choose theme (#1499) 2023-11-21 12:02:01 +01:00
Marco Romano
af8f5b805c Delete media caches on startup (#1807)
Clear media caches on app startup
2023-11-20 09:48:11 +00:00
Benoit Marty
115a07ef84 Merge pull request #1806 from vector-im/feature/fga/lock_screen_composition
LockScreen : rework LoggedInFlowNode and Back management
2023-11-14 23:15:44 +01:00
Benoit Marty
208d34f296 Format comment 2023-11-14 23:15:27 +01:00
ganfra
34ae25a56a #1806 fix compilation 2023-11-14 21:38:15 +01:00
ganfra
b9a637458b LockScreen : avoid removing from composition the LoggedInFlowNode.Children when LockScreen is displayed. 2023-11-14 20:59:17 +01:00
Marco Romano
d4a152bd47 Remove lateinit from Application class
Just stumbled in this lateinit and thought we could just get rid of it.
2023-11-14 15:32:18 +01:00
ganfra
f10231091d LockScreen : refact some code and add secureFlag 2023-11-07 15:55:53 +01:00
ganfra
8d903362c8 Feature/fga/biometric unlock (#1702)
* Biometric unlock : refactor a bit existing classes

* Biometric unlock : first implementation

* Biometric: add ui for biometric setup

* Biometric unlock : use localazy strings

* Biometric unlock setup : branch skip/allow events

* Biometric : fix tests

* Biometrics: add small test

* Biometric : clean up

* Update screenshots

* Biometric unlock : address some PR review

* Biometric : improve a bit edge cases

* Fix lint issues

---------

Co-authored-by: ganfra <francoisg@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-10-31 19:22:43 +01:00
Marco Romano
d7054fb34d Add global context.cacheDir provider. (#1606)
## Type of change

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

## Content

Dagger now provides the app's `cacheDir` when requesting a `@CacheDirectory File`  type.

## Motivation and context

To support some upcoming code that needs the `cacheDir` to be changed during tests.
2023-10-19 14:07:45 +02:00
Benoit Marty
bdd7ecd789 Move konsist test to their own module. 2023-10-12 18:41:38 +02:00
Benoit Marty
5022b83c05 Konsist: add test for Events 2023-10-12 15:03:50 +02:00
Benoit Marty
7afae87b3e Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
Benoit Marty
eebc39fab7 Konsist: add test about PreviewParameterProvider class name and fix existing issues. 2023-10-12 15:03:50 +02:00
Benoit Marty
365acbadef Konsist: add test to check Node class name. 2023-10-12 15:03:50 +02:00
Benoit Marty
5d42375151 Split Konsist test into multiple files 2023-10-12 15:03:50 +02:00
Benoit Marty
69c46c993e Konsist: no field should have 'm' prefix, and fix new detected issues. 2023-10-10 22:09:57 +02:00
Benoit Marty
108ce544d7 Konsist: improve test about no default value for State classes, and fix new detected issues. 2023-10-10 21:42:18 +02:00
Benoit Marty
fbd868cf6b Rename some test 2023-10-10 17:31:04 +02:00
Benoit Marty
0405683713 Konsist: add test Function which creates Presenter in test MUST be named 'createPresenterName', and fix existing issues 2023-10-10 17:31:04 +02:00
Benoit Marty
de31f8a73a Konsist: add test Data class state MUST not have default value, and fix existing issues 2023-10-10 17:31:04 +02:00
Benoit Marty
308a0c0f57 Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +02:00
Benoit Marty
675f77bfa4 Add some Konsist test. 2023-10-10 14:21:36 +02:00
Marco Romano
049742b2cc Switch off enableOnBackInvokedCallback due to androidx bug (#1517)
Switch off `enableOnBackInvokedCallback` until https://issuetracker.google.com/issues/271303558 is fixed.


Fixes https://github.com/vector-im/element-x-android/issues/1461
2023-10-09 08:39:56 +00:00
Benoit Marty
aef707ab25 Merge pull request #1435 from vector-im/feature/bma/storeImages
Store images and app icon
2023-10-02 10:19:06 +02:00
Benoit Marty
6998be87e7 App icon: Increase foreground ratio from 64 to 66%. 2023-09-29 22:50:14 +02:00
Benoit Marty
3fafdffc6e Format file. 2023-09-28 10:54:42 +02:00
Benoit Marty
dd43474190 Import network-security-config.xml file from EA. 2023-09-28 10:54:26 +02:00
ganfra
678de99cbb Revert "DI: more cleanup"
This reverts commit dda474cb1e.
2023-09-19 18:07:20 +02:00
ganfra
dda474cb1e DI: more cleanup 2023-09-19 17:57:54 +02:00
ganfra
1a14a18a29 DI: rework how components are created and provided 2023-09-19 17:51:36 +02:00
Benoit Marty
8f01c0b9dd Merge pull request #1363 from vector-im/feature/bma/appIcon
Update app icon
2023-09-18 17:28:43 +02:00
Benoit Marty
e3f445d9d6 Set different app icon background for debug/release/nightly. (#1089) 2023-09-18 15:18:00 +02:00
Benoit Marty
893f336425 New app icon (imported with 64% of scale) 2023-09-18 13:10:07 +02:00
Marco Romano
1187633549 Enable Android 13/14 predictive back gesture
https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture
2023-09-18 12:07:26 +02:00
Benoit Marty
51432c4d04 setenv "RUST_BACKTRACE" to "1" to get more info when a Rust stacktrace is printed out. 2023-09-11 09:17:50 +02:00
Jorge Martin Espinosa
b20d9f6973 De-duplicate sonar job in the CI (#1238)
* De-duplicate sonar job in the CI

* Remove workaround for `src/*/kotlin` folders

* Downgrade the sonarqube plugin version

* Try increasing workers for this job, since it's quite slow

* Warn about regression in latest sonarqube release

* Forbid backups to prevent cryptographic issues
2023-09-07 11:19:13 +00:00