mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Removed finish() method for tutorial/feedback and logout menu options.
This commit is contained in:
parent
2c1f20f1fd
commit
5548cec02e
1 changed files with 12 additions and 9 deletions
|
|
@ -97,30 +97,35 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
||||||
drawerLayout.closeDrawer(navigationView);
|
drawerLayout.closeDrawer(navigationView);
|
||||||
if (!(this instanceof ContributionsActivity)) {
|
if (!(this instanceof ContributionsActivity)) {
|
||||||
ContributionsActivity.startYourself(this);
|
ContributionsActivity.startYourself(this);
|
||||||
|
this.finish();
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case R.id.action_nearby:
|
case R.id.action_nearby:
|
||||||
drawerLayout.closeDrawer(navigationView);
|
drawerLayout.closeDrawer(navigationView);
|
||||||
if (!(this instanceof NearbyActivity)) {
|
if (!(this instanceof NearbyActivity)) {
|
||||||
NearbyActivity.startYourself(this);
|
NearbyActivity.startYourself(this);
|
||||||
|
this.finish();
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case R.id.action_about:
|
case R.id.action_about:
|
||||||
drawerLayout.closeDrawer(navigationView);
|
drawerLayout.closeDrawer(navigationView);
|
||||||
if (!(this instanceof AboutActivity)) {
|
if (!(this instanceof AboutActivity)) {
|
||||||
AboutActivity.startYourself(this);
|
AboutActivity.startYourself(this);
|
||||||
|
this.finish();
|
||||||
}
|
}
|
||||||
break;
|
this.finish();
|
||||||
|
return true;
|
||||||
case R.id.action_settings:
|
case R.id.action_settings:
|
||||||
drawerLayout.closeDrawer(navigationView);
|
drawerLayout.closeDrawer(navigationView);
|
||||||
if (!(this instanceof SettingsActivity)) {
|
if (!(this instanceof SettingsActivity)) {
|
||||||
SettingsActivity.startYourself(this);
|
SettingsActivity.startYourself(this);
|
||||||
|
this.finish();
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case R.id.action_introduction:
|
case R.id.action_introduction:
|
||||||
drawerLayout.closeDrawer(navigationView);
|
drawerLayout.closeDrawer(navigationView);
|
||||||
WelcomeActivity.startYourself(this);
|
WelcomeActivity.startYourself(this);
|
||||||
break;
|
return true;
|
||||||
case R.id.action_feedback:
|
case R.id.action_feedback:
|
||||||
drawerLayout.closeDrawer(navigationView);
|
drawerLayout.closeDrawer(navigationView);
|
||||||
Intent feedbackIntent = new Intent(Intent.ACTION_SEND);
|
Intent feedbackIntent = new Intent(Intent.ACTION_SEND);
|
||||||
|
|
@ -135,7 +140,7 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
||||||
} catch (ActivityNotFoundException e) {
|
} catch (ActivityNotFoundException e) {
|
||||||
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case R.id.action_logout:
|
case R.id.action_logout:
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setMessage(R.string.logout_verification)
|
.setMessage(R.string.logout_verification)
|
||||||
|
|
@ -147,13 +152,11 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.no, (dialog, which) -> dialog.cancel())
|
.setNegativeButton(R.string.no, (dialog, which) -> dialog.cancel())
|
||||||
.show();
|
.show();
|
||||||
break;
|
return true;
|
||||||
default:
|
default:
|
||||||
Timber.e("Unknown option [%s] selected from the navigation menu", itemId);
|
Timber.e("Unknown option [%s] selected from the navigation menu", itemId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.finish();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BaseLogoutListener implements CommonsApplication.LogoutListener {
|
private class BaseLogoutListener implements CommonsApplication.LogoutListener {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue