Merge pull request #6694 from jennaharris7/feature/scroll-to-unread-messages

Timeline: jump-to-unread FAB and mark-as-read shortcut
This commit is contained in:
Benoit Marty
2026-06-02 16:39:01 +02:00
committed by GitHub
15 changed files with 896 additions and 47 deletions
@@ -8,7 +8,9 @@
package io.element.android.libraries.designsystem.atomic.atoms
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
@@ -32,6 +34,7 @@ fun UnreadIndicatorAtom(
color: Color = ElementTheme.colors.unreadIndicator,
isVisible: Boolean = true,
contentDescription: String? = null,
border: BorderStroke? = null,
) {
Box(
modifier = modifier
@@ -41,6 +44,7 @@ fun UnreadIndicatorAtom(
.size(size)
.clip(CircleShape)
.background(if (isVisible) color else Color.Transparent)
.then(if (border != null) Modifier.border(border, CircleShape) else Modifier)
)
}