mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
Fix the Detekt issues on the timeline selection code
This commit is contained in:
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
+3
-3
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user