Invite people to a room: add dividers
This commit is contained in:
parent
e3fb510af4
commit
deeb6fb22d
5 changed files with 15 additions and 10 deletions
|
|
@ -24,7 +24,7 @@ import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -40,6 +40,7 @@ import io.element.android.libraries.designsystem.components.button.BackButton
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||||
import io.element.android.libraries.designsystem.theme.components.CenterAlignedTopAppBar
|
import io.element.android.libraries.designsystem.theme.components.CenterAlignedTopAppBar
|
||||||
|
import io.element.android.libraries.designsystem.theme.components.Divider
|
||||||
import io.element.android.libraries.designsystem.theme.components.Scaffold
|
import io.element.android.libraries.designsystem.theme.components.Scaffold
|
||||||
import io.element.android.libraries.designsystem.theme.components.SearchBar
|
import io.element.android.libraries.designsystem.theme.components.SearchBar
|
||||||
import io.element.android.libraries.designsystem.theme.components.SearchBarResultState
|
import io.element.android.libraries.designsystem.theme.components.SearchBarResultState
|
||||||
|
|
@ -181,7 +182,7 @@ private fun RoomInviteMembersSearchBar(
|
||||||
)
|
)
|
||||||
|
|
||||||
LazyColumn {
|
LazyColumn {
|
||||||
items(results) { invitableUser ->
|
itemsIndexed(results) { index, invitableUser ->
|
||||||
if (invitableUser.isUnresolved && !invitableUser.isAlreadyInvited && !invitableUser.isAlreadyJoined) {
|
if (invitableUser.isUnresolved && !invitableUser.isAlreadyInvited && !invitableUser.isAlreadyJoined) {
|
||||||
CheckableUnresolvedUserRow(
|
CheckableUnresolvedUserRow(
|
||||||
checked = invitableUser.isSelected,
|
checked = invitableUser.isSelected,
|
||||||
|
|
@ -208,6 +209,10 @@ private fun RoomInviteMembersSearchBar(
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index < results.lastIndex) {
|
||||||
|
Divider()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:5e6e6f3b7c00bebfc9bbc50cb68747321946a0f88ff1a11134479ec39c23468c
|
oid sha256:6ce332185060fe0571610e9a060ce6dfafc7619dad384725456a4a755c39a123
|
||||||
size 61202
|
size 61131
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:0e9994622ad2ff83d5072fa0c5d344b7bb757401b6e77fa7d6705d32c73f8b27
|
oid sha256:77b5d690e30b652cbbb791f42dfe64359f594861a2b4423819f8ca5323618224
|
||||||
size 48731
|
size 48781
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:cbdb7a11090e85c5a9597acfe1e883d85afa4b3ff0fcd5520e8112d93b061a1c
|
oid sha256:cccab9884c289a5fed109f7b5c0d0f3cf4e7502b49224b9d8febd8091d1a2833
|
||||||
size 58150
|
size 58176
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f87c71f73e740637e05bd3311e66e11dc0dd1c663edd32dfda510731e186f971
|
oid sha256:baed4459022e43e83676d2a01d9b7e37fc6b7a5749dead54b1a40f263329d10d
|
||||||
size 46944
|
size 47061
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue