Add handling for no-bubble outgoing messages without wallpaper.
This commit is contained in:
parent
044454dca2
commit
17b24d3c24
2 changed files with 7 additions and 16 deletions
|
@ -471,7 +471,7 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
|||
val timer = binding.footerExpiry
|
||||
val record = conversationMessage.messageRecord
|
||||
if (record.expiresIn > 0 && !record.isPending) {
|
||||
timer.setColorFilter(themeDelegate.getFooterTextColor(conversationMessage), PorterDuff.Mode.SRC_IN)
|
||||
timer.setColorFilter(themeDelegate.getFooterForegroundColor(conversationMessage), PorterDuff.Mode.SRC_IN)
|
||||
|
||||
timer.visible = true
|
||||
timer.setPercentComplete(0f)
|
||||
|
@ -626,7 +626,7 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
|||
|
||||
binding.footerDate.setOnClickListener(null)
|
||||
binding.footerDate.visible = true
|
||||
binding.footerDate.setTextColor(themeDelegate.getFooterTextColor(conversationMessage))
|
||||
binding.footerDate.setTextColor(themeDelegate.getFooterForegroundColor(conversationMessage))
|
||||
|
||||
val record = conversationMessage.messageRecord
|
||||
if (record.isFailed) {
|
||||
|
@ -668,6 +668,8 @@ open class V2ConversationItemTextOnlyViewHolder<Model : MappingModel<Model>>(
|
|||
val record = conversationMessage.messageRecord
|
||||
val newMessageId = record.buildMessageId()
|
||||
|
||||
deliveryStatus.setTint(themeDelegate.getFooterForegroundColor(conversationMessage))
|
||||
|
||||
if (messageId != newMessageId && deliveryStatus.isPending && !record.isPending) {
|
||||
if (record.toRecipient.isGroup) {
|
||||
SignalLocalMetrics.GroupMessageSend.onUiUpdated(record.id)
|
||||
|
|
|
@ -32,26 +32,15 @@ class V2ConversationItemTheme(
|
|||
}
|
||||
|
||||
@ColorInt
|
||||
fun getFooterIconColor(
|
||||
fun getFooterForegroundColor(
|
||||
conversationMessage: ConversationMessage
|
||||
): Int {
|
||||
if (conversationMessage.messageRecord.isThumbnailAtBottomOfBubble(context)) {
|
||||
return ContextCompat.getColor(context, R.color.signal_colorOnCustom)
|
||||
}
|
||||
|
||||
return getColor(
|
||||
conversationMessage,
|
||||
conversationContext.getColorizer()::getOutgoingFooterIconColor,
|
||||
conversationContext.getColorizer()::getIncomingFooterIconColor
|
||||
)
|
||||
}
|
||||
|
||||
@ColorInt
|
||||
fun getFooterTextColor(
|
||||
conversationMessage: ConversationMessage
|
||||
): Int {
|
||||
if (conversationMessage.messageRecord.isThumbnailAtBottomOfBubble(context)) {
|
||||
return ContextCompat.getColor(context, R.color.signal_colorOnCustom)
|
||||
if (conversationMessage.messageRecord.isOutgoing && conversationMessage.messageRecord.hasNoBubble(context) && !conversationContext.hasWallpaper()) {
|
||||
return conversationContext.getColorizer().getIncomingFooterTextColor(context, conversationContext.hasWallpaper())
|
||||
}
|
||||
|
||||
return getColor(
|
||||
|
|
Loading…
Add table
Reference in a new issue