Remove default value and clarify the code
This commit is contained in:
parent
8bcc9203ad
commit
b387eac448
1 changed files with 4 additions and 2 deletions
|
|
@ -589,7 +589,8 @@ internal fun TextComposerEditCaptionPreview() = ElementPreview {
|
||||||
state = textEditorState,
|
state = textEditorState,
|
||||||
voiceMessageState = VoiceMessageState.Idle,
|
voiceMessageState = VoiceMessageState.Idle,
|
||||||
composerMode = aMessageComposerModeEditCaption(
|
composerMode = aMessageComposerModeEditCaption(
|
||||||
content = "A caption",
|
// Set an existing caption so that the UI will be in edit caption mode
|
||||||
|
content = "An existing caption",
|
||||||
),
|
),
|
||||||
enableVoiceMessages = false,
|
enableVoiceMessages = false,
|
||||||
)
|
)
|
||||||
|
|
@ -606,6 +607,7 @@ internal fun TextComposerAddCaptionPreview() = ElementPreview {
|
||||||
state = textEditorState,
|
state = textEditorState,
|
||||||
voiceMessageState = VoiceMessageState.Idle,
|
voiceMessageState = VoiceMessageState.Idle,
|
||||||
composerMode = aMessageComposerModeEditCaption(
|
composerMode = aMessageComposerModeEditCaption(
|
||||||
|
// No caption so that the UI will be in add caption mode
|
||||||
content = "",
|
content = "",
|
||||||
),
|
),
|
||||||
enableVoiceMessages = false,
|
enableVoiceMessages = false,
|
||||||
|
|
@ -759,7 +761,7 @@ fun aMessageComposerModeEdit(
|
||||||
|
|
||||||
fun aMessageComposerModeEditCaption(
|
fun aMessageComposerModeEditCaption(
|
||||||
eventOrTransactionId: EventOrTransactionId = EventId("$1234").toEventOrTransactionId(),
|
eventOrTransactionId: EventOrTransactionId = EventId("$1234").toEventOrTransactionId(),
|
||||||
content: String = "Some caption",
|
content: String,
|
||||||
) = MessageComposerMode.EditCaption(
|
) = MessageComposerMode.EditCaption(
|
||||||
eventOrTransactionId = eventOrTransactionId,
|
eventOrTransactionId = eventOrTransactionId,
|
||||||
content = content
|
content = content
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue