Fix the Detekt issues on the timeline selection code

This commit is contained in:
ganfra
2026-10-05 20:48:24 +02:00
parent 9b2dcd4b26
commit cb501f3b5f
2 changed files with 4 additions and 4 deletions
@@ -194,7 +194,7 @@ internal fun TimelineItemRow(
layout(width = width, height = height) {
contentPlaceable.place(0, 0)
if (indicatorPlaceable != null) {
val bubbleCenter = contentPlaceable[BubbleVerticalCenter].takeIf { it != AlignmentLine.Unspecified } ?: (height / 2)
val bubbleCenter = contentPlaceable[BubbleVerticalCenter].takeIf { it != AlignmentLine.Unspecified } ?: height / 2
val x = if (layoutDirection == LayoutDirection.Ltr) 0 else width - indicatorPlaceable.width
indicatorPlaceable.place(x = x, y = bubbleCenter - indicatorPlaceable.height / 2)
}
@@ -12,12 +12,12 @@ package io.element.android.features.messages.impl.timeline.model
*
* @param isSelectionModeActive whether the timeline is currently in selection mode. Drives
* behaviour (e.g. the whole-row click target) and must reflect the real mode, not [progress].
* @param progress animated 0f..1f value driving the visuals (content slide + indicator slide-in).
* Animated once in TimelineView and shared by every row. Differs from [isSelectionModeActive]
* during the enter/exit animation.
* @param isSelected whether this specific row's event is part of the current selection.
* @param canBeSelected whether this specific row's event can be selected for the action selection mode was entered for.
* Rows which cannot be selected render no indicator, and their content does not slide.
* @param progress animated 0f..1f value driving the visuals (content slide + indicator slide-in).
* Animated once in TimelineView and shared by every row. Differs from [isSelectionModeActive]
* during the enter/exit animation.
*/
data class TimelineItemSelectionData(
val isSelectionModeActive: Boolean = false,