mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Replaced resource ID switches by ifs
This commit is contained in:
@@ -137,22 +137,18 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
|
||||
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||
@Override
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.string.title_compose:
|
||||
onActionCompose();
|
||||
return true;
|
||||
|
||||
case R.string.title_answer_hide:
|
||||
onActionHide(!item.isChecked());
|
||||
return true;
|
||||
|
||||
case R.string.title_copy:
|
||||
onActionCopy();
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == R.string.title_compose) {
|
||||
onActionCompose();
|
||||
return true;
|
||||
} else if (itemId == R.string.title_answer_hide) {
|
||||
onActionHide(!item.isChecked());
|
||||
return true;
|
||||
} else if (itemId == R.string.title_copy) {
|
||||
onActionCopy();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void onActionCompose() {
|
||||
|
||||
Reference in New Issue
Block a user