mirror of https://github.com/M66B/FairEmail.git
Long press setup to reload, long press about for log
This commit is contained in:
parent
148e057db0
commit
fe60acee7c
|
@ -219,11 +219,14 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
onMenuInbox((long) item.getData());
|
onMenuInbox((long) item.getData());
|
||||||
return true;
|
return true;
|
||||||
case R.string.menu_setup:
|
case R.string.menu_setup:
|
||||||
onShowLog();
|
onReload();
|
||||||
return true;
|
return true;
|
||||||
case R.string.menu_faq:
|
case R.string.menu_faq:
|
||||||
onDebugInfo();
|
onDebugInfo();
|
||||||
return true;
|
return true;
|
||||||
|
case R.string.menu_about:
|
||||||
|
onShowLog();
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -783,13 +786,39 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onShowLog() {
|
private void onMenuRate() {
|
||||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
Intent faq = getIntentFAQ();
|
||||||
getSupportFragmentManager().popBackStack("logs", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
if (faq.resolveActivity(getPackageManager()) == null)
|
||||||
|
Helper.view(this, getIntentRate());
|
||||||
|
else {
|
||||||
|
new DialogBuilderLifecycle(this, this)
|
||||||
|
.setMessage(R.string.title_issue)
|
||||||
|
.setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
Helper.view(ActivityView.this, getIntentFAQ());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(R.string.title_no, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
Helper.view(ActivityView.this, getIntentRate());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
private void onMenuInvite() {
|
||||||
fragmentTransaction.replace(R.id.content_frame, new FragmentLogs()).addToBackStack("logs");
|
startActivityForResult(getIntentInvite(), REQUEST_INVITE);
|
||||||
fragmentTransaction.commit();
|
}
|
||||||
|
|
||||||
|
private void onMenuOtherApps() {
|
||||||
|
Helper.view(this, getIntentOtherApps());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onReload() {
|
||||||
|
ServiceSynchronize.reload(this, "manual reload");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDebugInfo() {
|
private void onDebugInfo() {
|
||||||
|
@ -939,35 +968,13 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
}.load(this, new Bundle());
|
}.load(this, new Bundle());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onMenuRate() {
|
private void onShowLog() {
|
||||||
Intent faq = getIntentFAQ();
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||||
if (faq.resolveActivity(getPackageManager()) == null)
|
getSupportFragmentManager().popBackStack("logs", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||||
Helper.view(this, getIntentRate());
|
|
||||||
else {
|
|
||||||
new DialogBuilderLifecycle(this, this)
|
|
||||||
.setMessage(R.string.title_issue)
|
|
||||||
.setPositiveButton(R.string.title_yes, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
Helper.view(ActivityView.this, getIntentFAQ());
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(R.string.title_no, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
Helper.view(ActivityView.this, getIntentRate());
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onMenuInvite() {
|
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||||
startActivityForResult(getIntentInvite(), REQUEST_INVITE);
|
fragmentTransaction.replace(R.id.content_frame, new FragmentLogs()).addToBackStack("logs");
|
||||||
}
|
fragmentTransaction.commit();
|
||||||
|
|
||||||
private void onMenuOtherApps() {
|
|
||||||
Helper.view(this, getIntentOtherApps());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DrawerItem {
|
private class DrawerItem {
|
||||||
|
|
Loading…
Reference in New Issue