Change the enlarged avatar name to the chat name

This commit is contained in:
Hocuri
2020-06-07 13:03:52 +02:00
parent 40cad4ec4b
commit fec3eec0af
@@ -395,8 +395,9 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
public void onEnlargeAvatar() {
String profileImagePath;
Uri profileImageUri;
DcChat dcChat = dcContext.getChat(chatId);
if(chatId!=0)
profileImagePath = dcContext.getChat(chatId).getProfileImage();
profileImagePath = dcChat.getProfileImage();
else
profileImagePath = dcContext.getContact(contactId).getProfileImage();
@@ -405,7 +406,7 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
Intent intent = new Intent(this, MediaPreviewActivity.class);
intent.setDataAndType(profileImageUri, type);
intent.putExtra(MediaPreviewActivity.ACTIVITY_TITLE_EXTRA, getString(isContactProfile() ? R.string.pref_profile_photo : R.string.group_avatar));
intent.putExtra(MediaPreviewActivity.ACTIVITY_TITLE_EXTRA, dcChat.getName());
intent.putExtra(MediaPreviewActivity.EDIT_AVATAR_CHAT_ID, chatIsGroup ? chatId : 0); // shows edit-button, might be 0 for a contact-profile
startActivity(intent);
}