mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-14 04:22:12 +00:00
Update blocked contact list item on main thread.
Fixes #3825 // FREEBIE
This commit is contained in:
@@ -8,6 +8,7 @@ import android.widget.TextView;
|
|||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
import org.thoughtcrime.securesms.components.AvatarImageView;
|
import org.thoughtcrime.securesms.components.AvatarImageView;
|
||||||
import org.thoughtcrime.securesms.recipients.Recipients;
|
import org.thoughtcrime.securesms.recipients.Recipients;
|
||||||
|
import org.thoughtcrime.securesms.util.Util;
|
||||||
|
|
||||||
public class BlockedContactListItem extends RelativeLayout implements Recipients.RecipientsModifiedListener {
|
public class BlockedContactListItem extends RelativeLayout implements Recipients.RecipientsModifiedListener {
|
||||||
|
|
||||||
@@ -42,9 +43,17 @@ public class BlockedContactListItem extends RelativeLayout implements Recipients
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onModified(Recipients recipients) {
|
public void onModified(final Recipients recipients) {
|
||||||
this.contactPhotoImage.setAvatar(recipients, false);
|
final AvatarImageView contactPhotoImage = this.contactPhotoImage;
|
||||||
this.nameView.setText(recipients.toShortString());
|
final TextView nameView = this.nameView;
|
||||||
|
|
||||||
|
Util.runOnMain(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
contactPhotoImage.setAvatar(recipients, false);
|
||||||
|
nameView.setText(recipients.toShortString());
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Recipients getRecipients() {
|
public Recipients getRecipients() {
|
||||||
|
|||||||
Reference in New Issue
Block a user