Commit Graph

1371 Commits

Author SHA1 Message Date
Benoit Marty fcee53b23e Rename val for clarity 2024-10-08 13:47:47 +02:00
Benoit Marty 189fbe9d11 Use produceState 2024-10-08 13:45:25 +02:00
Benoit Marty 0fd275d32b Fix preview of identity change banner in a timeline. 2024-10-08 11:48:09 +02:00
Benoit Marty 33bfe1db8d Fix broken previews 2024-10-08 11:48:06 +02:00
Benoit Marty e49d689fe8 Improve code. 2024-10-08 11:23:11 +02:00
Benoit Marty 0099777360 Fix code quality. 2024-10-08 11:09:46 +02:00
Benoit Marty bc62f8cfce Fix compilation issues. 2024-10-08 10:27:07 +02:00
Benoit Marty 5baefd479f Identity change: handle click on "learn more" 2024-10-08 09:35:18 +02:00
Benoit Marty 3e5dd4bdfe Avoid using application context. 2024-10-08 09:06:40 +02:00
Benoit Marty 9a85e92025 Do not inject presenter directly. 2024-10-07 22:25:05 +02:00
Benoit Marty d9fb0cf656 Pin user identity. 2024-10-07 22:19:13 +02:00
Benoit Marty c69e5f47e5 Render PinViolation above the composer. 2024-10-07 22:18:32 +02:00
Benoit Marty 6cfebc18fa Cleanup 2024-10-07 17:46:17 +02:00
Benoit Marty d744e075d5 Remove dependencies to other presenters in MessagesPresenter. 2024-10-07 17:46:17 +02:00
Benoit Marty b211941673 Merge pull request #3611 from frebib/frebib/black-on-black
Fix black-on-black status bars with hidden media
2024-10-07 09:38:38 +02:00
bmarty e25ba65170 Sync Strings from Localazy 2024-10-07 00:28:33 +00:00
Joe Groocock 0b67dfdc3d Use CircleShape instead of 50% RoundedCornerShape
This is a builtin alias for the same thing.

Signed-off-by: Joe Groocock <me@frebib.net>
2024-10-05 15:57:07 +00:00
Joe Groocock 1e4be645b8 Fix black-on-black status bars with hidden media
In dark mode, the ElementTheme composable incorrectly applied a dark
colour to the status bars, which was nearly invisible on top of the
black background of the app.

Signed-off-by: Joe Groocock <me@frebib.net>
2024-10-05 15:54:42 +00:00
Benoit Marty 1fad4d43be Do not inject the TimelineProtectionPresenter 2024-10-04 17:02:05 +02:00
Benoit Marty a72c406c86 Fix preview name. 2024-10-04 17:02:04 +02:00
Benoit Marty b889e8681c Rename hideContent to hideMediaContent 2024-10-04 17:02:03 +02:00
Benoit Marty fafd5d4871 Let invokeOnCurrentTimeline lambda param return Unit so that we can remove run block. 2024-10-04 17:02:02 +02:00
Benoit Marty a3e2457834 SuppressWarnings ModifierClickableOrder 2024-10-04 17:02:02 +02:00
Benoit Marty 8b282f27e5 Hide images: iterate on design. 2024-10-04 17:01:59 +02:00
Benoit Marty 5285696b0a Fix test name. 2024-10-04 17:01:58 +02:00
Benoit Marty a465b0c080 Remove dead code. 2024-10-04 17:01:57 +02:00
Benoit Marty 73bdf0e1ce Add unit test on ProtectedView and TimelineProtectionState 2024-10-04 17:01:56 +02:00
Benoit Marty 8ffdfff839 Add unit test on TimelineProtectionPresenter 2024-10-04 17:01:55 +02:00
Benoit Marty 0244b71795 Fix test compilation 2024-10-04 17:01:53 +02:00
Benoit Marty dd2a1b3388 Add settings to hide images and videos in the timeline.
Hide images, videos and stickers in the timeline.
Disable click on hidden content. It must be revealed first.
Add preview without BlurHash.
Also hide image in thumbnails.
2024-10-04 17:01:51 +02:00
renovate[bot] 98d9abecd9 fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.4.15 (#3595)
* Update dependency io.nlopez.compose.rules:detekt to v0.4.15

* Fix new detekt issues

* Fix KtLint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-10-04 16:58:19 +02:00
Valere 2230163bbe dep | Adapt rust-sdk, rename PreviouslyVerified to VerificationViolation 2024-10-04 12:37:33 +02:00
ganfra adc03c9676 timeline : improve jumpTo precision (introducing animateScrollToItemCenter) 2024-10-03 15:33:03 +02:00
ganfra 88e01e7c2e timeline : fix jumpToBottom for not live timeline. 2024-10-03 13:14:14 +02:00
ganfra 8b6fba8512 timeline : add synchronisation around timelineItemIndexer 2024-10-03 13:14:14 +02:00
ganfra b88e65a3ed timeline : fix lastOutgoingMessage after last changes 2024-10-03 13:14:14 +02:00
ganfra 1e4c30c569 timeline : makes typingNotification item part of the timelineItems. 2024-10-03 13:14:14 +02:00
Benoit Marty ee7e5b8a46 Merge pull request #3576 from frebib/frebib/dupe-room-crash
Prevent crash with duplicate room suggestion
2024-10-02 13:54:19 +02:00
Jorge Martin Espinosa 79c17f714f Use Anvil KSP instead of the Square KAPT one (#3564)
* Use Anvil KSP instead of the Square KAPT one

* Fix several configuration cache, lint and test issues

* Allow incremental kotlin compilation in the CI

* Workaround Robolectric + Compose issue that caused `AppNotIdleException`

* Update the `enterprise` commit hash

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2024-10-02 11:52:17 +00:00
Joe Groocock 7f3ebbb85d Prevent crash with duplicate room suggestion
If two rooms have the same canonical alias, e.g. the recently tombstoned
and upgraded #foundation-office:matrix.org, typing `#foun` into the
composer could cause the app to crash. This avoids that by using the
(hopefully) globally unique room id as the key instead.

Signed-off-by: Joe Groocock <me@frebib.net>
2024-10-02 09:47:29 +00:00
renovate[bot] 3001efb525 Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50 (#3565)
* Adapt to changes in the SDK

* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50

* Use lambda instead of overriding the `EventDebugInfoProvider` interface

* Fix test proposal.
We may find a better way to compare data class instance if we need to do more comparison in the future...

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-01 09:44:52 +02:00
Joe Groocock 555f73dfa8 Use MSC2530 filename when loading media
In the case of captioned images, the `body` of the event is the caption,
and is ill suited to be a filename. Often the caption can be
prohibitively long, causing the media to fail to load in some cases.

Fixes: https://github.com/element-hq/element-x-android/issues/2882
Signed-off-by: Joe Groocock <me@frebib.net>
2024-09-30 20:05:58 +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 78da5a91b5 Fix crash when aspectRatio is null. 2024-09-30 09:48:59 +02:00
Benoit Marty 24c7be609d Merge pull request #3548 from element-hq/feature/fga/timeline_remove_item_animation
timeline : remove animateItem
2024-09-27 10:11:54 +02:00
renovate[bot] 231217c438 Update dependency io.element.android:compound-android to v0.1.0 (#3524)
* Update dependency io.element.android:compound-android to v0.1.0

* Fix usages of `AvatarColorsProvider`

* Update screenshots

* Fix tests and lint issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
2024-09-26 14:54:25 +00:00
ganfra 5a8cfda4c7 timeline : remove animateItem 2024-09-26 16:05:05 +02:00
renovate[bot] 9756afc5d1 Update dependency androidx.compose:compose-bom to v2024.09.00 (#3399)
* Update dependency androidx.compose:compose-bom to v2024.09.00

* Adapt code for changes.

* Workaround crash when closing the RTE

* Fix broken bottom sheet colors and shape

* Fix tons of warnings and deprecations

* Fix lint issues

* Fix more M3 update changes

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: ganfra <francoisg@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2024-09-26 09:30:20 +02:00
Benoit Marty 900074ee20 flatMap with runCatching is more appropriate here. 2024-09-24 16:39:13 +02:00
Benoit Marty d4e8488dc4 Merge pull request #3523 from element-hq/feature/fga/pinned_messages_analytics
Pinned messages analytics
2024-09-24 09:35:14 +02:00