From e88a7c3fd7f8a36231761e04be1aa71568ff913f Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 28 Jul 2015 14:19:28 -0700 Subject: [PATCH] Update blocked contact list item on main thread. Fixes #3825 // FREEBIE --- .../preferences/BlockedContactListItem.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/preferences/BlockedContactListItem.java b/src/org/thoughtcrime/securesms/preferences/BlockedContactListItem.java index 38b78f1ddc..92798e1959 100644 --- a/src/org/thoughtcrime/securesms/preferences/BlockedContactListItem.java +++ b/src/org/thoughtcrime/securesms/preferences/BlockedContactListItem.java @@ -8,6 +8,7 @@ import android.widget.TextView; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.components.AvatarImageView; import org.thoughtcrime.securesms.recipients.Recipients; +import org.thoughtcrime.securesms.util.Util; public class BlockedContactListItem extends RelativeLayout implements Recipients.RecipientsModifiedListener { @@ -42,9 +43,17 @@ public class BlockedContactListItem extends RelativeLayout implements Recipients } @Override - public void onModified(Recipients recipients) { - this.contactPhotoImage.setAvatar(recipients, false); - this.nameView.setText(recipients.toShortString()); + public void onModified(final Recipients recipients) { + final AvatarImageView contactPhotoImage = this.contactPhotoImage; + final TextView nameView = this.nameView; + + Util.runOnMain(new Runnable() { + @Override + public void run() { + contactPhotoImage.setAvatar(recipients, false); + nameView.setText(recipients.toShortString()); + } + }); } public Recipients getRecipients() {