1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-24 08:38:51 -05:00

remove single message items from the Action bar

This commit is contained in:
Jesse Vincent 2012-09-12 20:46:10 -04:00
parent be1e376094
commit 7b40e5b14a
2 changed files with 0 additions and 56 deletions

View File

@ -1,25 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/single_message_options"
android:icon="?attr/iconActionSingleMessageOptions"
android:showAsAction="always"
android:title="@string/single_message_options_action">
<menu>
<item
android:id="@+id/forward"
android:title="@string/forward_action"/>
<item
android:id="@+id/reply_all"
android:title="@string/reply_all_action"/>
<item
android:id="@+id/reply"
android:title="@string/reply_action"/>
<item
android:id="@+id/send_again"
android:title="@string/send_again_action"/>
</menu>
</item>
<item
android:id="@+id/delete"
android:title="@string/delete_action"
@ -60,7 +40,4 @@
android:showAsAction="ifRoom"
android:icon="?attr/iconActionSpam"
/>
<item
android:id="@+id/same_sender"
android:title="@string/from_same_sender" />
</menu>

View File

@ -2764,10 +2764,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
// enable or disable forward, reply,....
menu.findItem(R.id.single_message_options)
.setVisible(mSelectedCount > 1 ? false : true);
if (mQueryString != null) {
// show all
menu.findItem(R.id.move).setVisible(true);
@ -2901,36 +2897,7 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
mSelectedCount = 0;
break;
}
// only if a single message is selected
case R.id.reply: {
onReply(selection.get(0));
mSelectedCount = 0;
break;
}
case R.id.reply_all: {
onReplyAll(selection.get(0));
mSelectedCount = 0;
break;
}
case R.id.forward: {
onForward(selection.get(0));
mSelectedCount = 0;
break;
}
case R.id.send_again: {
onResendMessage(selection.get(0));
mSelectedCount = 0;
break;
}
case R.id.same_sender: {
MessageList.actionHandle(MessageList.this, "From " + selection.get(0).sender,
selection.get(0).senderAddress, false, null, null);
mSelectedCount = 0;
break;
}
}
if (mSelectedCount == 0) {
mActionMode.finish();
}