From 3cf77b6fd0395bdf245db555c7b14c248d1281c3 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Sun, 30 Sep 2012 12:28:03 -0700 Subject: [PATCH] Display contact icons correctly in MMS ConversationItems --- src/org/thoughtcrime/securesms/ConversationAdapter.java | 5 ++--- src/org/thoughtcrime/securesms/recipients/Recipient.java | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/org/thoughtcrime/securesms/ConversationAdapter.java b/src/org/thoughtcrime/securesms/ConversationAdapter.java index a0b6564411..e14636d5ae 100644 --- a/src/org/thoughtcrime/securesms/ConversationAdapter.java +++ b/src/org/thoughtcrime/securesms/ConversationAdapter.java @@ -43,7 +43,6 @@ import org.thoughtcrime.securesms.service.MessageNotifier; import ws.com.google.android.mms.MmsException; import java.util.LinkedHashMap; -import java.util.Map.Entry; /** * A cursor adapter for a conversation thread. Ultimately @@ -175,8 +174,8 @@ public class ConversationAdapter extends CursorAdapter { MessageRecord messageRecord; - if (type.equals("mms")) messageRecord = getNewMmsMessageRecord(messageId, cursor); - else messageRecord = getNewSmsMessageRecord(messageId, cursor); + if (type.equals("mms")) messageRecord = getNewMmsMessageRecord(messageId, cursor); + else messageRecord = getNewSmsMessageRecord(messageId, cursor); messageRecordCache.put(type + messageId, messageRecord); return messageRecord; diff --git a/src/org/thoughtcrime/securesms/recipients/Recipient.java b/src/org/thoughtcrime/securesms/recipients/Recipient.java index 88ed853d39..63fecf6b5a 100644 --- a/src/org/thoughtcrime/securesms/recipients/Recipient.java +++ b/src/org/thoughtcrime/securesms/recipients/Recipient.java @@ -50,9 +50,10 @@ public class Recipient implements Parcelable { } public Recipient(Parcel in) { - this.name = in.readString(); - this.number = in.readString(); - this.contactUri = in.readParcelable(null); + this.name = in.readString(); + this.number = in.readString(); + this.contactUri = in.readParcelable(null); + this.contactPhoto = in.readParcelable(null); } public Uri getContactUri() { @@ -75,6 +76,7 @@ public class Recipient implements Parcelable { dest.writeString(name); dest.writeString(number); dest.writeParcelable(contactUri, 0); + dest.writeParcelable(contactPhoto, 0); } public String toShortString() {