diff --git a/src/org/thoughtcrime/securesms/ConversationItem.java b/src/org/thoughtcrime/securesms/ConversationItem.java index 72b6bf1a3f..1c4e902bbc 100644 --- a/src/org/thoughtcrime/securesms/ConversationItem.java +++ b/src/org/thoughtcrime/securesms/ConversationItem.java @@ -39,10 +39,10 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; +import org.thoughtcrime.securesms.components.AlertView; import org.thoughtcrime.securesms.components.AudioView; import org.thoughtcrime.securesms.components.AvatarImageView; import org.thoughtcrime.securesms.components.DeliveryStatusView; -import org.thoughtcrime.securesms.components.AlertView; import org.thoughtcrime.securesms.components.ExpirationTimerView; import org.thoughtcrime.securesms.components.ThumbnailView; import org.thoughtcrime.securesms.crypto.MasterSecret; @@ -231,16 +231,21 @@ public class ConversationItem extends LinearLayout if (messageRecord.isOutgoing()) { bodyBubble.getBackground().setColorFilter(defaultBubbleColor, PorterDuff.Mode.MULTIPLY); mediaThumbnail.setBackgroundColorHint(defaultBubbleColor); + setAudioViewTint(messageRecord, conversationRecipients); + } else { + int color = recipient.getColor().toConversationColor(context); + bodyBubble.getBackground().setColorFilter(color, PorterDuff.Mode.MULTIPLY); + mediaThumbnail.setBackgroundColorHint(color); + } + } + private void setAudioViewTint(MessageRecord messageRecord, Recipients recipients) { + if (messageRecord.isOutgoing()) { if (DynamicTheme.LIGHT.equals(TextSecurePreferences.getTheme(context))) { - audioView.setTint(conversationRecipients.getColor().toConversationColor(context)); + audioView.setTint(recipients.getColor().toConversationColor(context)); } else { audioView.setTint(Color.WHITE); } - } else { - int color = recipient.getColor().toConversationColor(context); - bodyBubble.getBackground().setColorFilter(color, PorterDuff.Mode.MULTIPLY); - mediaThumbnail.setBackgroundColorHint(color); } } @@ -493,8 +498,13 @@ public class ConversationItem extends LinearLayout } @Override - public void onModified(Recipients recipient) { - onModified(recipient.getPrimaryRecipient()); + public void onModified(final Recipients recipients) { + Util.runOnMain(new Runnable() { + @Override + public void run() { + setAudioViewTint(messageRecord, recipients); + } + }); } private class AttachmentDownloadClickListener implements SlideClickListener {