check already loaded object in Recipient

This commit is contained in:
B. Petersen
2019-03-29 17:26:16 +01:00
parent 3eb5ddf961
commit 0604f797d0
@@ -202,10 +202,10 @@ public class Recipient implements RecipientModifiedListener {
public synchronized @Nullable ContactPhoto getContactPhoto(Context context) {
LocalFileContactPhoto contactPhoto = null;
if (address.isDcChat()) {
if (dcChat!=null) {
contactPhoto = new GroupRecordContactPhoto(context, address);
}
else if (address.isDcContact()) {
else if (dcContact!=null) {
contactPhoto = new ProfileContactPhoto(context, address);
}