diff --git a/app/src/fdroid/java/fr.gouv.etalab.mastodon/activities/MainActivity.java b/app/src/fdroid/java/fr.gouv.etalab.mastodon/activities/MainActivity.java index 8fa368538..654cabd3c 100644 --- a/app/src/fdroid/java/fr.gouv.etalab.mastodon/activities/MainActivity.java +++ b/app/src/fdroid/java/fr.gouv.etalab.mastodon/activities/MainActivity.java @@ -515,7 +515,7 @@ public class MainActivity extends AppCompatActivity }); Helper.loadPictureIcon(MainActivity.this, account.getAvatar(),iconbar); headerLayout = navigationView.getHeaderView(0); - + mamageNewIntent(getIntent()); final ImageView menuMore = (ImageView) headerLayout.findViewById(R.id.header_option_menu); menuMore.setOnClickListener(new View.OnClickListener() { @Override @@ -724,6 +724,7 @@ public class MainActivity extends AppCompatActivity * @param intent Intent - intent related to a notification in top bar */ private boolean mamageNewIntent(Intent intent){ + if( intent == null || intent.getExtras() == null ) return false; diff --git a/app/src/safetynet/java/fr.gouv.etalab.mastodon/activities/MainActivity.java b/app/src/safetynet/java/fr.gouv.etalab.mastodon/activities/MainActivity.java index 7d2e2c592..690f2308d 100644 --- a/app/src/safetynet/java/fr.gouv.etalab.mastodon/activities/MainActivity.java +++ b/app/src/safetynet/java/fr.gouv.etalab.mastodon/activities/MainActivity.java @@ -518,7 +518,7 @@ public class MainActivity extends AppCompatActivity }); Helper.loadPictureIcon(MainActivity.this, account.getAvatar(),iconbar); headerLayout = navigationView.getHeaderView(0); - + mamageNewIntent(getIntent()); final ImageView menuMore = (ImageView) headerLayout.findViewById(R.id.header_option_menu); menuMore.setOnClickListener(new View.OnClickListener() { @Override