Do not enlarge avatar if there is none (just a big letter in a circle)

This commit is contained in:
Hocuri
2020-06-07 13:42:49 +02:00
parent e3f4268ca6
commit ca47ec29a5
@@ -406,7 +406,10 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
title = dcContact.getDisplayName();
}
profileImageUri = Uri.fromFile(new File(profileImagePath));
File file = new File(profileImagePath);
if (!file.exists()) return;
profileImageUri = Uri.fromFile(file);
String type = "image/" + profileImagePath.substring(profileImagePath.lastIndexOf(".") +1);
Intent intent = new Intent(this, MediaPreviewActivity.class);