Konsist: improve test about no default value for State classes, and fix new detected issues.
This commit is contained in:
parent
22fa3dff15
commit
108ce544d7
10 changed files with 82 additions and 32 deletions
|
|
@ -25,10 +25,10 @@ import kotlinx.collections.immutable.ImmutableList
|
|||
@Immutable
|
||||
data class InviteListState(
|
||||
val inviteList: ImmutableList<InviteListInviteSummary>,
|
||||
val declineConfirmationDialog: InviteDeclineConfirmationDialog = InviteDeclineConfirmationDialog.Hidden,
|
||||
val acceptedAction: Async<RoomId> = Async.Uninitialized,
|
||||
val declinedAction: Async<Unit> = Async.Uninitialized,
|
||||
val eventSink: (InviteListEvents) -> Unit = {}
|
||||
val declineConfirmationDialog: InviteDeclineConfirmationDialog,
|
||||
val acceptedAction: Async<RoomId>,
|
||||
val declinedAction: Async<Unit>,
|
||||
val eventSink: (InviteListEvents) -> Unit
|
||||
)
|
||||
|
||||
sealed interface InviteDeclineConfirmationDialog {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ open class InviteListStateProvider : PreviewParameterProvider<InviteListState> {
|
|||
|
||||
internal fun aInviteListState() = InviteListState(
|
||||
inviteList = aInviteListInviteSummaryList(),
|
||||
declineConfirmationDialog = InviteDeclineConfirmationDialog.Hidden,
|
||||
acceptedAction = Async.Uninitialized,
|
||||
declinedAction = Async.Uninitialized,
|
||||
eventSink = {},
|
||||
)
|
||||
|
||||
internal fun aInviteListInviteSummaryList(): ImmutableList<InviteListInviteSummary> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue