aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Conversation.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-05 22:58:46 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-05 22:58:46 +0200
commitba63727f50c192e63e171bedca92d7003981800c (patch)
tree6b4956817a46266ec3de683bc6d7a4e46681a656 /src/eu/siacs/conversations/entities/Conversation.java
parent08755e56a5bf861c97eefd545f629ac67a804275 (diff)
fetch missing avatars from server
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/entities/Conversation.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java
index 29eb22b9..be641ea4 100644
--- a/src/eu/siacs/conversations/entities/Conversation.java
+++ b/src/eu/siacs/conversations/entities/Conversation.java
@@ -4,6 +4,8 @@ import java.security.interfaces.DSAPublicKey;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
+import eu.siacs.conversations.utils.UIHelper;
+
import net.java.otr4j.OtrException;
import net.java.otr4j.crypto.OtrCryptoEngineImpl;
import net.java.otr4j.crypto.OtrCryptoException;
@@ -13,7 +15,7 @@ import net.java.otr4j.session.SessionStatus;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
-import android.net.Uri;
+import android.graphics.Bitmap;
public class Conversation extends AbstractEntity {
public static final String TABLENAME = "conversations";
@@ -174,13 +176,6 @@ public class Conversation extends AbstractEntity {
return this.contactJid;
}
- public Uri getProfilePhotoUri() {
- if (this.getProfilePhotoString() != null) {
- return Uri.parse(this.getProfilePhotoString());
- }
- return null;
- }
-
public int getStatus() {
return this.status;
}
@@ -396,4 +391,12 @@ public class Conversation extends AbstractEntity {
public Bookmark getBookmark() {
return this.bookmark;
}
+
+ public Bitmap getImage(Context context, int size) {
+ if (mode==MODE_SINGLE) {
+ return getContact().getImage(size, context);
+ } else {
+ return UIHelper.getContactPicture(this, size, context, false);
+ }
+ }
}