refactor (start chat) : use invite people module in room details screen
This commit is contained in:
parent
98343e0531
commit
c41994ad13
20 changed files with 207 additions and 543 deletions
|
|
@ -9,4 +9,5 @@ package io.element.android.features.invitepeople.api
|
|||
|
||||
interface InvitePeopleEvents {
|
||||
data object SendInvites : InvitePeopleEvents
|
||||
data object CloseSearch : InvitePeopleEvents
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,7 @@
|
|||
package io.element.android.features.invitepeople.api
|
||||
|
||||
interface InvitePeopleState {
|
||||
val canInvite: Boolean
|
||||
val isSearchActive: Boolean
|
||||
val eventSink: (InvitePeopleEvents) -> Unit
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.features.invitepeople.api
|
||||
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||
|
||||
class InvitePeopleStateProvider : PreviewParameterProvider<InvitePeopleState> {
|
||||
override val values: Sequence<InvitePeopleState>
|
||||
get() = sequenceOf(
|
||||
PreviewInvitePeopleState(),
|
||||
PreviewInvitePeopleState(canInvite = true),
|
||||
PreviewInvitePeopleState(isSearchActive = true)
|
||||
)
|
||||
}
|
||||
|
||||
private data class PreviewInvitePeopleState(
|
||||
override val canInvite: Boolean = false,
|
||||
override val isSearchActive: Boolean = false,
|
||||
override val eventSink: (InvitePeopleEvents) -> Unit = {}
|
||||
) : InvitePeopleState
|
||||
Loading…
Add table
Add a link
Reference in a new issue