Skip to content

Commit ff7df0e

Browse files
authored
Merge pull request #3856 from deltachat/adb/issue-3855
don't enlarge avatars for special chats
2 parents dc216fe + 8ff8cff commit ff7df0e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
* fix "Archived" item's layout in chat-list
6+
* don't enlarge "Saved Messages" and "Devices Messages" avatars on click
67

78
## v2.9.0
89

src/main/java/org/thoughtcrime/securesms/ProfileActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ public void onEnlargeAvatar() {
315315
String profileImagePath;
316316
String title;
317317
Uri profileImageUri;
318-
boolean chatIsEncrypted = true;
318+
boolean enlargeAvatar = true;
319319
if(chatId!=0) {
320320
DcChat dcChat = dcContext.getChat(chatId);
321321
profileImagePath = dcChat.getProfileImage();
322322
title = dcChat.getName();
323-
chatIsEncrypted = dcChat.isEncrypted();
323+
enlargeAvatar = dcChat.isEncrypted() && !dcChat.isSelfTalk() && !dcChat.isDeviceTalk();
324324
} else {
325325
DcContact dcContact = dcContext.getContact(contactId);
326326
profileImagePath = dcContact.getProfileImage();
@@ -329,7 +329,7 @@ public void onEnlargeAvatar() {
329329

330330
File file = new File(profileImagePath);
331331

332-
if (chatIsEncrypted && file.exists()) {
332+
if (enlargeAvatar && file.exists()) {
333333
profileImageUri = Uri.fromFile(file);
334334
String type = "image/" + profileImagePath.substring(profileImagePath.lastIndexOf(".") + 1);
335335

0 commit comments

Comments
 (0)