mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
fix opening avatar-preview, getBaseContext() is not needed and led to crashes on some android versions as this context might not be an Activity
This commit is contained in:
@@ -401,12 +401,11 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
|
||||
profileImagePath = dcContext.getContact(contactId).getProfileImage();
|
||||
|
||||
profileImageUri = Uri.fromFile(new File(profileImagePath));
|
||||
Context ctx = getBaseContext();
|
||||
String type = "image/" + profileImagePath.substring(profileImagePath.lastIndexOf(".") +1);
|
||||
|
||||
Intent intent = new Intent(ctx, MediaPreviewActivity.class);
|
||||
intent.setDataAndType(profileImageUri, type);
|
||||
ctx.startActivity(intent);
|
||||
Intent intent = new Intent(this, MediaPreviewActivity.class);
|
||||
intent.setDataAndType(profileImageUri, type);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void onEditName() {
|
||||
|
||||
Reference in New Issue
Block a user