Merge pull request #3856 from deltachat/adb/issue-3855

don't enlarge avatars for special chats
This commit is contained in:
adb
2025-08-02 19:49:42 +00:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -3,6 +3,7 @@
## Unreleased
* fix "Archived" item's layout in chat-list
* don't enlarge "Saved Messages" and "Devices Messages" avatars on click
## v2.9.0
@@ -315,12 +315,12 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
String profileImagePath;
String title;
Uri profileImageUri;
boolean chatIsEncrypted = true;
boolean enlargeAvatar = true;
if(chatId!=0) {
DcChat dcChat = dcContext.getChat(chatId);
profileImagePath = dcChat.getProfileImage();
title = dcChat.getName();
chatIsEncrypted = dcChat.isEncrypted();
enlargeAvatar = dcChat.isEncrypted() && !dcChat.isSelfTalk() && !dcChat.isDeviceTalk();
} else {
DcContact dcContact = dcContext.getContact(contactId);
profileImagePath = dcContact.getProfileImage();
@@ -329,7 +329,7 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
File file = new File(profileImagePath);
if (chatIsEncrypted && file.exists()) {
if (enlargeAvatar && file.exists()) {
profileImageUri = Uri.fromFile(file);
String type = "image/" + profileImagePath.substring(profileImagePath.lastIndexOf(".") + 1);