Add caption to outgoing stories.

This commit is contained in:
Alex Hart 2022-03-22 15:12:44 -03:00 committed by Greyson Parrelli
parent 6890973ce8
commit b04acd8ae0
2 changed files with 3 additions and 2 deletions

View file

@ -93,6 +93,7 @@ class MediaSelectionRepository(context: Context) {
for (media in updatedMedia) {
Log.w(TAG, media.uri.toString() + " : " + media.transformProperties.map { t: TransformProperties -> "" + t.isVideoTrim }.orElse("null"))
media.setCaption(trimmedBody)
}
val singleRecipient: Recipient? = singleContact?.let { Recipient.resolved(it.recipientId) }

View file

@ -477,8 +477,8 @@ class StoryViewerPageFragment :
@SuppressLint("SetTextI18n")
private fun presentCaption(caption: TextView, largeCaption: TextView, largeCaptionOverlay: View, storyPost: StoryPost) {
val displayBody = if (storyPost.content is StoryPost.Content.AttachmentContent) {
storyPost.conversationMessage.getDisplayBody(requireContext())
val displayBody: String = if (storyPost.content is StoryPost.Content.AttachmentContent) {
storyPost.content.attachment.caption ?: ""
} else {
""
}