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