From 8d8ac9373efc1cae4d868868025669dc11f226fe Mon Sep 17 00:00:00 2001 From: Jenna Vassar <5023996+jennaharris7@users.noreply.github.com> Date: Mon, 11 May 2026 11:59:10 -0700 Subject: [PATCH] Rename preview to reflect actual state --- .../android/features/messages/impl/timeline/TimelineView.kt | 5 ++++- .../io/element/android/tests/konsist/KonsistPreviewTest.kt | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index 443fc1681a..cec1d57e58 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -604,6 +604,9 @@ internal fun TimelineViewPreview( } } +// The jump-to-unread FAB's indicator is always rendered when the FAB is visible — in +// production the FAB only appears when unread content exists above. So `hasUnreadAbove` +// here only varies the scroll-target state, not the upper indicator's visibility. @Composable private fun TimelineViewWithReadMarker( hasUnreadAbove: Boolean, @@ -648,7 +651,7 @@ private fun TimelineViewWithReadMarker( @PreviewsDayNight @Composable -internal fun TimelineViewWithReadMarkerNoIndicatorsPreview() = ElementPreview { +internal fun TimelineViewWithReadMarkerJumpToUnreadIndicatorOnlyPreview() = ElementPreview { TimelineViewWithReadMarker(hasUnreadAbove = false, hasUnreadBelow = false) } diff --git a/tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistPreviewTest.kt b/tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistPreviewTest.kt index 6dc0e7fc56..0a8d5d6b89 100644 --- a/tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistPreviewTest.kt +++ b/tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistPreviewTest.kt @@ -161,7 +161,7 @@ class KonsistPreviewTest { "TimelineVideoWithCaptionRowPreview", "TimelineViewMessageShieldPreview", "TimelineViewWithReadMarkerBothIndicatorsPreview", - "TimelineViewWithReadMarkerNoIndicatorsPreview", + "TimelineViewWithReadMarkerJumpToUnreadIndicatorOnlyPreview", "UserAvatarColorsPreview", "UserProfileHeaderSectionWithVerificationViolationPreview", "VoiceItemViewPlayPreview",