1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Don't reuse IDs

This commit is contained in:
cketti 2014-04-07 19:17:50 +02:00
parent c53973910f
commit ab72aa0dd7
2 changed files with 17 additions and 15 deletions

View File

@ -111,22 +111,22 @@
android:title="@string/refile_action">
<menu>
<item
android:id="@+id/archive"
android:id="@+id/refile_archive"
android:title="@string/archive_action"/>
<!-- MessageView -->
<item
android:id="@+id/spam"
android:id="@+id/refile_spam"
android:title="@string/spam_action"/>
<!-- MessageView -->
<item
android:id="@+id/move"
android:id="@+id/refile_move"
android:title="@string/move_action"/>
<!-- MessageView -->
<item
android:id="@+id/copy"
android:id="@+id/refile_copy"
android:title="@string/copy_action"/>
</menu>
</item>

View File

@ -867,19 +867,23 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
mMessageViewFragment.onToggleRead();
return true;
}
case R.id.archive: {
case R.id.archive:
case R.id.refile_archive: {
mMessageViewFragment.onArchive();
return true;
}
case R.id.spam: {
case R.id.spam:
case R.id.refile_spam: {
mMessageViewFragment.onSpam();
return true;
}
case R.id.move: {
case R.id.move:
case R.id.refile_move: {
mMessageViewFragment.onMove();
return true;
}
case R.id.copy: {
case R.id.copy:
case R.id.refile_copy: {
mMessageViewFragment.onCopy();
return true;
}
@ -1035,14 +1039,12 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
/*
* Set visibility of copy, move, archive, spam in action bar and refile submenu
*/
Menu refileSubmenu = menu.findItem(R.id.refile).getSubMenu();
if (mMessageViewFragment.isCopyCapable()) {
menu.findItem(R.id.copy).setVisible(K9.isMessageViewCopyActionVisible());
refileSubmenu.findItem(R.id.copy).setVisible(true);
menu.findItem(R.id.refile_copy).setVisible(true);
} else {
menu.findItem(R.id.copy).setVisible(false);
refileSubmenu.findItem(R.id.copy).setVisible(false);
menu.findItem(R.id.refile_copy).setVisible(false);
}
if (mMessageViewFragment.isMoveCapable()) {
@ -1055,9 +1057,9 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
menu.findItem(R.id.spam).setVisible(canMessageBeMovedToSpam &&
K9.isMessageViewSpamActionVisible());
refileSubmenu.findItem(R.id.move).setVisible(true);
refileSubmenu.findItem(R.id.archive).setVisible(canMessageBeArchived);
refileSubmenu.findItem(R.id.spam).setVisible(canMessageBeMovedToSpam);
menu.findItem(R.id.refile_move).setVisible(true);
menu.findItem(R.id.refile_archive).setVisible(canMessageBeArchived);
menu.findItem(R.id.refile_spam).setVisible(canMessageBeMovedToSpam);
} else {
menu.findItem(R.id.move).setVisible(false);
menu.findItem(R.id.archive).setVisible(false);