File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/src/main/java/fr/free/nrw/commons/contributions Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -662,7 +662,7 @@ public Integer getContributionStateAt(int position) {
662662 }
663663
664664 public boolean backButtonClicked () {
665- if (null != mediaDetailPagerFragment && mediaDetailPagerFragment .isVisible ()) {
665+ if (mediaDetailPagerFragment != null && mediaDetailPagerFragment .isVisible ()) {
666666 if (store .getBoolean ("displayNearbyCardView" , true ) && !isUserProfile ) {
667667 if (nearbyNotificationCardView .cardViewVisibilityState == NearbyNotificationCardView .CardViewVisibilityState .READY ) {
668668 nearbyNotificationCardView .setVisibility (View .VISIBLE );
@@ -679,9 +679,10 @@ public boolean backButtonClicked() {
679679 }else {
680680 fetchCampaigns ();
681681 }
682- if (getActivity () instanceof MainActivity ) {
682+ if (getActivity () instanceof MainActivity ) {
683683 // Fragment is associated with MainActivity
684- ((MainActivity )getActivity ()).showTabs ();
684+ ((BaseActivity ) getActivity ()).getSupportActionBar ().setDisplayHomeAsUpEnabled (false );
685+ ((MainActivity ) getActivity ()).showTabs ();
685686 }
686687 return true ;
687688 }
You can’t perform that action at this time.
0 commit comments