File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
app/src/main/java/fr/free/nrw/commons/theme Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,27 @@ public boolean onNavigationItemSelected(@NonNull final MenuItem item) {
7777 switch (item .getItemId ()) {
7878 case R .id .action_home :
7979 drawerLayout .closeDrawer (navigationView );
80- ContributionsActivity .startYourself (this );
80+ if (!(this instanceof ContributionsActivity )) {
81+ ContributionsActivity .startYourself (this );
82+ }
8183 return true ;
8284 case R .id .action_nearby :
8385 drawerLayout .closeDrawer (navigationView );
84- NearbyActivity .startYourself (this );
86+ if (!(this instanceof NearbyActivity )) {
87+ NearbyActivity .startYourself (this );
88+ }
8589 return true ;
8690 case R .id .action_about :
8791 drawerLayout .closeDrawer (navigationView );
88- AboutActivity .startYourself (this );
92+ if (!(this instanceof AboutActivity )) {
93+ AboutActivity .startYourself (this );
94+ }
8995 return true ;
9096 case R .id .action_settings :
9197 drawerLayout .closeDrawer (navigationView );
92- SettingsActivity .startYourself (this );
98+ if (!(this instanceof SettingsActivity )) {
99+ SettingsActivity .startYourself (this );
100+ }
93101 return true ;
94102 case R .id .action_introduction :
95103 drawerLayout .closeDrawer (navigationView );
You can’t perform that action at this time.
0 commit comments