Commit Graph

43 Commits

Author SHA1 Message Date
bmarty
9456ee921d Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
bmarty
3dddd90d97 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
bmarty
5a4cac7d2d Sync Strings from Localazy 2025-02-03 00:29:01 +00:00
bmarty
d419f2fdff Sync Strings from Localazy 2025-01-27 00:25:38 +00:00
Benoit Marty
03523c9567 Provide duration 2025-01-22 16:22:18 +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
bmarty
7a57ec1cc1 Sync Strings from Localazy 2024-12-23 00:16:39 +00:00
bmarty
e18e4142c7 Sync Strings from Localazy 2024-12-16 00:28:36 +00:00
Benoit Marty
53217b5112 Restore providing the Locale 2024-12-12 12:09:59 +01:00
Benoit Marty
d21917278c Add preview for date rendering 2024-12-12 11:28:55 +01:00
Benoit Marty
01a5766438 Move FakeClock to the impl/test folder. 2024-12-12 09:21:51 +01:00
Benoit Marty
daf0811bb3 Add doc and examples. 2024-12-12 00:21:03 +01:00
Benoit Marty
d5b716ac3e Add more tests. 2024-12-12 00:21:02 +01:00
Benoit Marty
1b1ca04934 Avoid code duplication between the 2 tests. 2024-12-12 00:21:01 +01:00
Benoit Marty
4188d58b56 Implement month separator for the Gallery.
Improve day separator rendering in the timeline.
Use Today, Yesterday, and the name of the day if less than 7 days and do not render the year for the current year.
Improve date format for the media viewer.
Rework how date and time are computed.
ActionListView: Time can take more space, so update the layout.
2024-12-11 23:57:57 +01:00
Benoit Marty
9916efefa2 Cleanup 2024-11-27 16:12:28 +01:00
Benoit Marty
fdb1123127 Add a duration formatter. 2024-11-27 16:05:50 +01:00
Benoit Marty
d1b3ecab36 Incoming session verification request
Add more log to the state machines
Ensure the block cannot be cancelled, else if the Rust SDK emit a new state during the API execution, the state machine may cancel the api call.
Let VerificationFlowState values match the SDK api for code clarity.
Rename sub interface for clarity.
Migrate tests to the new FakeVerificationService.
2024-10-29 09:26:15 +01:00
Jorge Martin Espinosa
6b2aa7eb8c Refresh room summaries when date or time changes in the device (#3683)
* Add `DateTimeObserver` to rebuild the room summary data when the date/time changes.

* Add time changed action too, to trigger when the user manually changes date/time

* Fix timezone issue by adding `TimezoneProvider`, fix tests

* Create test for `DateTimeObserver` usage in `RoomListDataSource`

* Create aRoomListRoomSummaryFactory function.

* Improve test by faking the lastMessageTimestampFormatter

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-16 09:10:58 +00:00
Jorge Martin Espinosa
60f1bf6e54 Upgrade the used JDK in the project to v21 (#3582)
* Upgrade the used JDK in the project to v21

* Use it for CI too

* Centralise java language version

* Fix deprecations, tests and lint issues

* Fix coverage taking into account `@Preview` annotated code.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-03 09:38:03 +00:00
Jorge Martin Espinosa
2efdb3ae45 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
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Jorge Martin Espinosa
950e502ca6 Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
Jorge Martin Espinosa
edd61e96c2 Use full date format for day dividers in timeline (#3057)
* Use full date format for day dividers in timeline

* Use AM/PM for `DefaultLastMessageTimestampFormatter` when the locale needs it
2024-06-20 13:09:06 +00:00
Benoit Marty
4a84350261 Remove empty manifest files. 2024-06-13 18:20:19 +02:00
Benoit Marty
330e760386 Move RoomListRoomSummary factory to a dedicated file, more tests will be added. 2024-02-08 11:34:54 +01:00
Benoit Marty
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +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
d433c3cbaa Enable detekt rules AlsoCouldBeApply and fix existing issues. 2023-07-26 11:10:46 +02:00
Benoit Marty
be6b8c825b Fix account provider change on nightly and release (#861)
* Use parallelMap (same code)

* Add proguard rules. Fixes #818

* Rename file proguard-rules.pro to consumer-rules.pro for coherency.

* Remove empty and non-referenced proguard files.
2023-07-13 14:46:57 +02:00
Jorge Martin Espinosa
afd58f1634 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
Jorge Martin Espinosa
d9183e4092 Display most recent activity in room list (#220)
* Create `RoomLastMessageFormatter` to produce readable room summaries.

* Add unit tests using Robolectric, fix bugs

* Add changelog

* Move `RoomLastMessageFormatter` back to `impl` module, allow it to receive an `EventTimelineItem` instead of `MessageContent`.
2023-03-20 11:18:25 +01:00
ganfra
b07e0e62b1 [Architecture] clean and makes compile 2023-03-09 10:18:25 +01:00
ganfra
7051bfc14e [Architecture] split all feature modules to api/impl 2023-03-08 16:13:45 +01:00
Benoit Marty
0037da4ce5 Split module dateformatter into api, impl and test. 2023-03-06 11:58:11 +01:00
Jorge Martin Espinosa
c20013243b Store session data in a secure way (#98)
* Replace SessionData DataStore with an encrypted SQLite DB.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-03-02 16:48:54 +01:00
ganfra
d687acf57f Fix test compilation 2023-03-01 11:11:09 +01:00
ganfra
2bbdecb6f0 Use DaySeperatorFormatter 2023-02-28 14:27:54 +01:00
Benoit Marty
310a8ca8e3 Fix dependency issue. 2023-02-09 12:04:31 +01:00
Benoit Marty
150c520501 Fix test: also inject timezone to avoid relying on the system timezone. 2023-02-07 10:36:29 +01:00
Benoit Marty
e706091a44 Add test for DefaultLastMessageFormatter 2023-02-07 10:36:29 +01:00
Benoit Marty
dfeb9d8c7f Create FakeLastMessageFormatter 2023-02-07 10:36:29 +01:00
Benoit Marty
674a813f3b Create module dateformatter 2023-02-07 10:36:29 +01:00