Improve code.
This commit is contained in:
parent
da08cc3e08
commit
9b7a9b2183
2 changed files with 4 additions and 2 deletions
|
|
@ -10,6 +10,7 @@ package io.element.android.features.messages.impl
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||||
import io.element.android.features.messages.impl.actionlist.ActionListState
|
import io.element.android.features.messages.impl.actionlist.ActionListState
|
||||||
import io.element.android.features.messages.impl.actionlist.anActionListState
|
import io.element.android.features.messages.impl.actionlist.anActionListState
|
||||||
|
import io.element.android.features.messages.impl.crypto.identity.IdentityChangeState
|
||||||
import io.element.android.features.messages.impl.crypto.identity.anIdentityChangeState
|
import io.element.android.features.messages.impl.crypto.identity.anIdentityChangeState
|
||||||
import io.element.android.features.messages.impl.messagecomposer.AttachmentsState
|
import io.element.android.features.messages.impl.messagecomposer.AttachmentsState
|
||||||
import io.element.android.features.messages.impl.messagecomposer.MessageComposerState
|
import io.element.android.features.messages.impl.messagecomposer.MessageComposerState
|
||||||
|
|
@ -107,6 +108,7 @@ fun aMessagesState(
|
||||||
focusedEventIndex = 2,
|
focusedEventIndex = 2,
|
||||||
),
|
),
|
||||||
timelineProtectionState: TimelineProtectionState = aTimelineProtectionState(),
|
timelineProtectionState: TimelineProtectionState = aTimelineProtectionState(),
|
||||||
|
identityChangeState: IdentityChangeState = anIdentityChangeState(),
|
||||||
readReceiptBottomSheetState: ReadReceiptBottomSheetState = aReadReceiptBottomSheetState(),
|
readReceiptBottomSheetState: ReadReceiptBottomSheetState = aReadReceiptBottomSheetState(),
|
||||||
actionListState: ActionListState = anActionListState(),
|
actionListState: ActionListState = anActionListState(),
|
||||||
customReactionState: CustomReactionState = aCustomReactionState(),
|
customReactionState: CustomReactionState = aCustomReactionState(),
|
||||||
|
|
@ -126,7 +128,7 @@ fun aMessagesState(
|
||||||
composerState = composerState,
|
composerState = composerState,
|
||||||
voiceMessageComposerState = voiceMessageComposerState,
|
voiceMessageComposerState = voiceMessageComposerState,
|
||||||
timelineProtectionState = timelineProtectionState,
|
timelineProtectionState = timelineProtectionState,
|
||||||
identityChangeState = anIdentityChangeState(),
|
identityChangeState = identityChangeState,
|
||||||
timelineState = timelineState,
|
timelineState = timelineState,
|
||||||
readReceiptBottomSheetState = readReceiptBottomSheetState,
|
readReceiptBottomSheetState = readReceiptBottomSheetState,
|
||||||
actionListState = actionListState,
|
actionListState = actionListState,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ internal fun MessagesViewWithIdentityChangePreview(
|
||||||
@PreviewParameter(IdentityChangeStateProvider::class) identityChangeState: IdentityChangeState
|
@PreviewParameter(IdentityChangeStateProvider::class) identityChangeState: IdentityChangeState
|
||||||
) = ElementPreview {
|
) = ElementPreview {
|
||||||
MessagesView(
|
MessagesView(
|
||||||
state = aMessagesState().copy(identityChangeState = identityChangeState),
|
state = aMessagesState(identityChangeState = identityChangeState),
|
||||||
onBackClick = {},
|
onBackClick = {},
|
||||||
onRoomDetailsClick = {},
|
onRoomDetailsClick = {},
|
||||||
onEventClick = { false },
|
onEventClick = { false },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue