Skip to content
Snippets Groups Projects
Verified Commit 97be2048 authored by Torsten Grote's avatar Torsten Grote Committed by Mikolai Gütschow
Browse files

Don't underlay scrollbar in thread view, so unread marker can show tooltip

parent 83fa7823
Branches
Tags
1 merge request!257Unread handling of forum posts
......@@ -68,7 +68,8 @@ fun main() = preview {
text = getRandomString(Random.nextInt(1, 1337)),
).apply { setLevel(Random.nextInt(0, 6)) },
selectedPost = null,
) {}
onPostSelected = {},
)
}
}
}
......@@ -79,8 +80,9 @@ fun ThreadItemView(
item: ThreadItem,
selectedPost: ThreadItem?,
onPostSelected: (ThreadItem) -> Unit,
modifier: Modifier = Modifier,
) {
Row(modifier = Modifier.height(IntrinsicSize.Min)) {
Row(modifier = modifier.height(IntrinsicSize.Min)) {
for (i in 1..item.getLevel()) {
VerticalDivider(modifier = Modifier.padding(start = 8.dp))
}
......
......@@ -22,6 +22,7 @@ import androidx.compose.foundation.VerticalScrollbar
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
......@@ -31,6 +32,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Alignment.Companion.CenterEnd
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.delay
import org.briarproject.bramble.api.sync.MessageId
import org.briarproject.briar.desktop.conversation.reallyVisibleItemsInfo
......@@ -56,10 +58,14 @@ fun ThreadedConversationScreen(
Box(modifier = modifier.fillMaxSize()) {
LazyColumn(
state = scrollState,
modifier = Modifier.selectableGroup()
modifier = Modifier.padding(end = 8.dp).selectableGroup()
) {
items(postsState.posts, key = { item -> item.id }) { item ->
ThreadItemView(item, selectedPost, onPostSelected)
ThreadItemView(
item = item,
selectedPost = selectedPost,
onPostSelected = onPostSelected,
)
}
}
UnreadFabs(scrollState, postsState)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment