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 3a38da0bb2..1eaf55ba46 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 @@ -192,7 +192,14 @@ class VisibleMessageView : LinearLayout { binding.dateBreakTextView.isVisible = showDateBreak // Message status indicator if (message.isOutgoing) { - val (iconID, iconColor) = getMessageStatusImage(message) + val (iconID, iconColor, textId) = getMessageStatusImage(message) + if (textId != null) { + binding.messageStatusTextView.setText(textId) + + if (iconColor != null) { + binding.messageStatusTextView.setTextColor(iconColor) + } + } if (iconID != null) { val drawable = ContextCompat.getDrawable(context, iconID)?.mutate() if (iconColor != null) { @@ -202,9 +209,20 @@ class VisibleMessageView : LinearLayout { } val lastMessageID = mmsSmsDb.getLastMessageID(message.threadId) - binding.messageStatusImageView.isVisible = - !message.isSent || message.id == lastMessageID + binding.messageStatusTextView.isVisible = ( + textId != null && ( + !message.isSent || + message.id == lastMessageID + ) + ) + binding.messageStatusImageView.isVisible = ( + iconID != null && ( + !message.isSent || + message.id == lastMessageID + ) + ) } else { + binding.messageStatusTextView.isVisible = false binding.messageStatusImageView.isVisible = false } // Expiration timer @@ -263,13 +281,17 @@ class VisibleMessageView : LinearLayout { } } - private fun getMessageStatusImage(message: MessageRecord): Pair { + private fun getMessageStatusImage(message: MessageRecord): Triple { return when { - !message.isOutgoing -> null to null - message.isFailed -> R.drawable.ic_error to resources.getColor(R.color.destructive, context.theme) - message.isPending -> R.drawable.ic_circle_dot_dot_dot to null - message.isRead -> R.drawable.ic_filled_circle_check to null - else -> R.drawable.ic_circle_check to null + !message.isOutgoing -> Triple(null, null, null) + message.isFailed -> + Triple(R.drawable.ic_delivery_status_failed, resources.getColor(R.color.destructive, context.theme), R.string.delivery_status_failed) + message.isPending -> + Triple(R.drawable.ic_delivery_status_sending, context.getColorFromAttr(R.attr.message_status_color), R.string.delivery_status_sending) + message.isRead -> + Triple(R.drawable.ic_delivery_status_read, context.getColorFromAttr(R.attr.message_status_color), R.string.delivery_status_read) + else -> + Triple(R.drawable.ic_delivery_status_sent, context.getColorFromAttr(R.attr.message_status_color), R.string.delivery_status_sent) } } diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000..c5de641a60 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_delivery_status_failed.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_read.png index 307190cae6..bc55b7dfee 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_delivery_status_read.png and b/app/src/main/res/drawable-hdpi/ic_delivery_status_read.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_sending.png index fbdcef3583..1b8991d98b 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_delivery_status_sending.png and b/app/src/main/res/drawable-hdpi/ic_delivery_status_sending.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-hdpi/ic_delivery_status_sent.png index 72b685aee4..96a7b6340c 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_delivery_status_sent.png and b/app/src/main/res/drawable-hdpi/ic_delivery_status_sent.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000..b13352d079 Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_delivery_status_failed.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_read.png index eee83ef591..072dac7b30 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_delivery_status_read.png and b/app/src/main/res/drawable-mdpi/ic_delivery_status_read.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_sending.png index b34ea32b8b..f9b7fe3b79 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_delivery_status_sending.png and b/app/src/main/res/drawable-mdpi/ic_delivery_status_sending.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-mdpi/ic_delivery_status_sent.png index ff6bf0fac5..26fceea79c 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_delivery_status_sent.png and b/app/src/main/res/drawable-mdpi/ic_delivery_status_sent.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000..79aaa03f2b Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_delivery_status_failed.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_read.png index 79c4857f6c..af79508abf 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_delivery_status_read.png and b/app/src/main/res/drawable-xhdpi/ic_delivery_status_read.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_sending.png index aca7fe7ef3..74b8694dd4 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_delivery_status_sending.png and b/app/src/main/res/drawable-xhdpi/ic_delivery_status_sending.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-xhdpi/ic_delivery_status_sent.png index 811a54373d..094d8b34ce 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_delivery_status_sent.png and b/app/src/main/res/drawable-xhdpi/ic_delivery_status_sent.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000..4ed4e2d8b1 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_failed.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_read.png index 474a570724..69376c9a20 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_read.png and b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_read.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sending.png index 4a81c629d8..3dce4a05ea 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sending.png and b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sending.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sent.png index f679aaf244..302afb8370 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sent.png and b/app/src/main/res/drawable-xxhdpi/ic_delivery_status_sent.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_failed.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_failed.png new file mode 100644 index 0000000000..6780212b8b Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_failed.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_read.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_read.png index c138886aa3..d0b16705c0 100644 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_read.png and b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_read.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sending.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sending.png index 461c2ea636..411dc9d502 100644 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sending.png and b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sending.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sent.png b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sent.png index 47bd9acd33..657d454f6e 100644 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sent.png and b/app/src/main/res/drawable-xxxhdpi/ic_delivery_status_sent.png differ diff --git a/app/src/main/res/layout/view_visible_message.xml b/app/src/main/res/layout/view_visible_message.xml index d36a5dfdeb..c07ca8bd71 100644 --- a/app/src/main/res/layout/view_visible_message.xml +++ b/app/src/main/res/layout/view_visible_message.xml @@ -22,16 +22,11 @@ android:id="@+id/mainContainer" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginStart="@dimen/small_spacing" + android:layout_marginEnd="@dimen/small_spacing" android:gravity="bottom" android:paddingBottom="@dimen/small_spacing"> - - - + + - - - - + app:layout_constraintTop_toBottomOf="@+id/emojiReactionsView" + tools:tint="@color/classic_dark_1" + android:src="@drawable/ic_delivery_status_sent" /> diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 888b0af633..f0d04162bc 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -164,6 +164,7 @@ + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 50a1f04572..d0ee94cf1d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -866,4 +866,8 @@ Close Dialog Database Upgrade Failed Please contact support to report the error. + Sending + Read + Sent + Failed to send diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index a2c3842b51..3555142f4c 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -370,6 +370,7 @@ @color/classic_dark_6 ?colorAccent @color/classic_dark_0 + @color/classic_dark_5 @color/classic_dark_1 @color/classic_dark_5 @color/classic_dark_6 @@ -454,6 +455,7 @@ @color/classic_light_0 ?colorAccent @color/classic_light_0 + @color/classic_light_1 @color/classic_light_6 @color/classic_light_1 @color/classic_light_0 @@ -535,6 +537,7 @@ @color/ocean_dark_7 ?colorAccent @color/ocean_dark_0 + @color/ocean_dark_5 @color/ocean_dark_1 @color/ocean_dark_5 @color/ocean_dark_7 @@ -618,6 +621,7 @@ @color/ocean_light_1 ?colorAccent @color/ocean_light_1 + @color/ocean_light_2 @color/ocean_light_7 @color/ocean_light_2 @color/ocean_light_1