Improve locking and performance on asynchronous contact loading.

This commit is contained in:
Moxie Marlinspike
2013-01-06 15:46:26 -08:00
parent 25f75cb3d2
commit 2204584d8f
7 changed files with 76 additions and 50 deletions

View File

@@ -103,6 +103,7 @@ public class ConversationListItem extends RelativeLayout
this.count = thread.getCount();
this.read = thread.isRead();
this.recipients.addListener(this);
this.fromView.setText(formatFrom(recipients, count, read));
if (thread.isKeyExchange())
@@ -124,7 +125,10 @@ public class ConversationListItem extends RelativeLayout
else checkbox.setVisibility(View.GONE);
setContactPhoto(this.recipients.getPrimaryRecipient());
this.recipients.setListener(this);
}
public void unbind() {
this.recipients.removeListener(this);
}
private void intializeListeners() {