Refactoring

pull/184/head
M66B 4 years ago
parent e10bff6f92
commit 944d2d1765

@ -229,14 +229,14 @@ public class FragmentRules extends FragmentBase {
@Override
public void onPrepareOptionsMenu(@NonNull Menu menu) {
super.onPrepareOptionsMenu(menu);
menu.findItem(R.id.menu_clear).setVisible(!EntityFolder.JUNK.equals(type));
menu.findItem(R.id.menu_clear_spam).setVisible(!EntityFolder.JUNK.equals(type));
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_clear:
onMenuClear();
case R.id.menu_clear_spam:
onMenuClearSpam();
return true;
default:
@ -244,7 +244,7 @@ public class FragmentRules extends FragmentBase {
}
}
private void onMenuClear() {
private void onMenuClearSpam() {
Bundle aargs = new Bundle();
aargs.putString("question", getString(R.string.title_rules_clear_confirm));
aargs.putLong("folder", folder);

@ -9,7 +9,7 @@
app:showAsAction="collapseActionView|always" />
<item
android:id="@+id/menu_clear"
android:id="@+id/menu_clear_spam"
android:title="@string/title_rules_clear"
app:showAsAction="never" />
</menu>

Loading…
Cancel
Save