Commit graph

37 commits

Author SHA1 Message Date
bmarty
45db2a97ad Sync Strings from Localazy 2024-12-23 00:16:39 +00:00
bmarty
ff3fbe9cbf Sync Strings from Localazy 2024-12-16 00:28:36 +00:00
Benoit Marty
a02491ab6f Restore providing the Locale 2024-12-12 12:09:59 +01:00
Benoit Marty
ab0324c53f Add preview for date rendering 2024-12-12 11:28:55 +01:00
Benoit Marty
6550ae361a Move FakeClock to the impl/test folder. 2024-12-12 09:21:51 +01:00
Benoit Marty
d4b0e37a83 Add doc and examples. 2024-12-12 00:21:03 +01:00
Benoit Marty
5e0e64f9c9 Add more tests. 2024-12-12 00:21:02 +01:00
Benoit Marty
605447ad87 Avoid code duplication between the 2 tests. 2024-12-12 00:21:01 +01:00
Benoit Marty
da272ddb07 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
28ed0920a4 Cleanup 2024-11-27 16:12:28 +01:00
Benoit Marty
98875a6503 Add a duration formatter. 2024-11-27 16:05:50 +01:00
Benoit Marty
b8b38208f4 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
2e9dce391b
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
f8fa218146
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
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
Jorge Martin Espinosa
b0cebf5ca0
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
4f69ab70cc
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
11711e8f67 Remove empty manifest files. 2024-06-13 18:20:19 +02:00
Benoit Marty
25768c7e87 Move RoomListRoomSummary factory to a dedicated file, more tests will be added. 2024-02-08 11:34:54 +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
Benoit Marty
19e81825ff Enable detekt rules AlsoCouldBeApply and fix existing issues. 2023-07-26 11:10:46 +02:00
Benoit Marty
c919618bc0
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
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
Jorge Martin Espinosa
ea17abebf3 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
86ebcc376d [Architecture] clean and makes compile 2023-03-09 10:18:25 +01:00
ganfra
bc9f3b69cc [Architecture] split all feature modules to api/impl 2023-03-08 16:13:45 +01:00
Benoit Marty
e2bd966878 Split module dateformatter into api, impl and test. 2023-03-06 11:58:11 +01:00
Jorge Martin Espinosa
6677f80abe 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
c362c7b069 Fix test compilation 2023-03-01 11:11:09 +01:00
ganfra
a5b5371fb6 Use DaySeperatorFormatter 2023-02-28 14:27:54 +01:00
Benoit Marty
165697a80e Fix dependency issue. 2023-02-09 12:04:31 +01:00
Benoit Marty
190d20acbe Fix test: also inject timezone to avoid relying on the system timezone. 2023-02-07 10:36:29 +01:00
Benoit Marty
6099fe5df7 Add test for DefaultLastMessageFormatter 2023-02-07 10:36:29 +01:00
Benoit Marty
6d8e4d9afc Create FakeLastMessageFormatter 2023-02-07 10:36:29 +01:00
Benoit Marty
ae4237abb5 Create module dateformatter 2023-02-07 10:36:29 +01:00