Fixes missing function

This commit is contained in:
Vitor Pamplona
2023-04-04 16:11:22 -04:00
parent 83d7085375
commit 05138232f4
2 changed files with 6 additions and 2 deletions

View File

@@ -251,4 +251,8 @@ open class NewPostViewModel : ViewModel() {
return message.text.isNotBlank() && !isUploadingImage && return message.text.isNotBlank() && !isUploadingImage &&
(!wantsPoll || pollOptions.values.all { it.isNotEmpty() }) (!wantsPoll || pollOptions.values.all { it.isNotEmpty() })
} }
fun canUsePoll(): Boolean {
return originalNote?.event !is PrivateDmEvent && originalNote?.channel() == null
}
} }

View File

@@ -286,7 +286,7 @@ fun ChatroomMessageCompose(
TranslatableRichTextViewer( TranslatableRichTextViewer(
eventContent, eventContent,
canPreview, canPreview,
Modifier, Modifier.padding(top = 5.dp),
note.event?.tags(), note.event?.tags(),
backgroundBubbleColor, backgroundBubbleColor,
accountViewModel, accountViewModel,
@@ -296,7 +296,7 @@ fun ChatroomMessageCompose(
TranslatableRichTextViewer( TranslatableRichTextViewer(
stringResource(R.string.could_not_decrypt_the_message), stringResource(R.string.could_not_decrypt_the_message),
true, true,
Modifier, Modifier.padding(top = 5.dp),
note.event?.tags(), note.event?.tags(),
backgroundBubbleColor, backgroundBubbleColor,
accountViewModel, accountViewModel,