Refactoring

This commit is contained in:
M66B 2020-09-08 12:13:52 +02:00
parent e10bff6f92
commit 944d2d1765
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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>