mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 01:51:24 +01:00
Added legend, privacy and about to setup menu
This commit is contained in:
@@ -364,6 +364,10 @@ public class FragmentSetup extends FragmentEx {
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.menu_legend:
|
||||
onMenuLegend();
|
||||
return true;
|
||||
|
||||
case R.id.menu_export:
|
||||
if (Helper.isPro(getContext()))
|
||||
startActivityForResult(getIntentExport(), ActivitySetup.REQUEST_EXPORT);
|
||||
@@ -378,6 +382,14 @@ public class FragmentSetup extends FragmentEx {
|
||||
startActivityForResult(getIntentImport(), ActivitySetup.REQUEST_IMPORT);
|
||||
return true;
|
||||
|
||||
case R.id.menu_privacy:
|
||||
onMenuPrivacy();
|
||||
return true;
|
||||
|
||||
case R.id.menu_about:
|
||||
onMenuAbout();
|
||||
return true;
|
||||
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
@@ -411,6 +423,22 @@ public class FragmentSetup extends FragmentEx {
|
||||
}
|
||||
}
|
||||
|
||||
private void onMenuPrivacy() {
|
||||
Helper.view(getContext(), Helper.getIntentPrivacy());
|
||||
}
|
||||
|
||||
private void onMenuLegend() {
|
||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentLegend()).addToBackStack("legend");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuAbout() {
|
||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentAbout()).addToBackStack("about");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private Intent getIntentHelp() {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse("https://github.com/M66B/open-source-email/blob/master/SETUP.md"));
|
||||
|
||||
Reference in New Issue
Block a user