design(space): let divider be full width
# Conflicts: # features/home/impl/src/main/kotlin/io/element/android/features/home/impl/spaces/HomeSpacesView.kt
This commit is contained in:
parent
f5e7a43f69
commit
72fda96df1
3 changed files with 92 additions and 90 deletions
|
|
@ -10,6 +10,7 @@ package io.element.android.features.home.impl.spaces
|
|||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.LazyListState
|
||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||
import androidx.compose.foundation.lazy.itemsIndexed
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
|
|
@ -57,20 +58,24 @@ fun HomeSpacesView(
|
|||
item {
|
||||
HorizontalDivider()
|
||||
}
|
||||
state.spaceRooms.forEach { spaceRoom ->
|
||||
item(spaceRoom.roomId) {
|
||||
val isInvitation = spaceRoom.state == CurrentUserMembership.INVITED
|
||||
SpaceRoomItemView(
|
||||
spaceRoom = spaceRoom,
|
||||
showUnreadIndicator = isInvitation && spaceRoom.roomId !in state.seenSpaceInvites,
|
||||
hideAvatars = isInvitation && state.hideInvitesAvatar,
|
||||
onClick = {
|
||||
onSpaceClick(spaceRoom.roomId)
|
||||
},
|
||||
onLongClick = {
|
||||
// TODO
|
||||
},
|
||||
)
|
||||
itemsIndexed(
|
||||
items = state.spaceRooms,
|
||||
key = { _, spaceRoom -> spaceRoom.roomId }
|
||||
) { index, spaceRoom ->
|
||||
val isInvitation = spaceRoom.state == CurrentUserMembership.INVITED
|
||||
SpaceRoomItemView(
|
||||
spaceRoom = spaceRoom,
|
||||
showUnreadIndicator = isInvitation && spaceRoom.roomId !in state.seenSpaceInvites,
|
||||
hideAvatars = isInvitation && state.hideInvitesAvatar,
|
||||
onClick = {
|
||||
onSpaceClick(spaceRoom.roomId)
|
||||
},
|
||||
onLongClick = {
|
||||
// TODO
|
||||
},
|
||||
)
|
||||
if (index != state.spaceRooms.lastIndex) {
|
||||
HorizontalDivider()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue