From 5fe123e7b54dfa4f5056af00e5440f01ec226a4e Mon Sep 17 00:00:00 2001 From: Al Lansley Date: Mon, 5 Aug 2024 14:37:47 +1000 Subject: [PATCH] Adjusted sending of mms messages to show 'Uploading' rather than 'Sending' as per SES-1721 --- .../v2/messages/VisibleMessageView.kt | 23 +++++++++++++------ libsession/src/main/res/values/strings.xml | 1 + 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt index 57598dadff..c510b364fb 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/messages/VisibleMessageView.kt @@ -268,8 +268,7 @@ class VisibleMessageView : FrameLayout { // Method to display or hide the status of a message. // Note: Although most commonly used to display the delivery status of a message, we also use the // message status area to display the disappearing messages state - so in this latter case we'll - // be displaying the "Sent" and the animating clock icon for outgoing messages or "Read" and the - // animated clock icon for incoming messages. + // be displaying either "Sent" or "Read" and the animating clock icon. private fun showStatusMessage(message: MessageRecord) { // We'll start by hiding everything and then only make visible what we need binding.messageStatusTextView.isVisible = false @@ -392,11 +391,21 @@ class VisibleMessageView : FrameLayout { R.string.messageStatusFailedToSync ) message.isPending -> - MessageStatusInfo( - R.drawable.ic_delivery_status_sending, - context.getColorFromAttr(R.attr.message_status_color), - R.string.sending - ) + // Non-mms messages display 'Sending'.. + if (!message.isMms) { + MessageStatusInfo( + R.drawable.ic_delivery_status_sending, + context.getColorFromAttr(R.attr.message_status_color), + R.string.sending + ) + } else { + // ..and Mms messages display 'Uploading'. + MessageStatusInfo( + R.drawable.ic_delivery_status_sending, + context.getColorFromAttr(R.attr.message_status_color), + R.string.messageStatusUploading + ) + } message.isSyncing || message.isResyncing -> MessageStatusInfo( R.drawable.ic_delivery_status_sending, diff --git a/libsession/src/main/res/values/strings.xml b/libsession/src/main/res/values/strings.xml index d573f97103..c348eed20a 100644 --- a/libsession/src/main/res/values/strings.xml +++ b/libsession/src/main/res/values/strings.xml @@ -512,6 +512,7 @@ Failed to send Failed to sync Syncing + Uploading Unread messages Voice Message Hold to record a voice message