diff --git a/res/drawable/ic_button_spam.png b/res/drawable/ic_button_spam.png
new file mode 100644
index 000000000..6fe49ee6a
Binary files /dev/null and b/res/drawable/ic_button_spam.png differ
diff --git a/res/layout/message_list.xml b/res/layout/message_list.xml
index 083fc383a..ca3c64298 100644
--- a/res/layout/message_list.xml
+++ b/res/layout/message_list.xml
@@ -30,6 +30,13 @@
android:layout_weight="1"
android:src="@drawable/ic_button_delete"
/>
+
messageList = new ArrayList();
+ // messages to be removed from the view
List removeHolderList = new ArrayList();
if (v == mBatchDoneButton)
@@ -3092,6 +3111,10 @@ public class MessageList
{
removeHolderList.add(holder);
}
+ else if (v == mBatchSpamButton)
+ {
+ removeHolderList.add(holder);
+ }
else if (v == mBatchFlagButton)
{
holder.flagged = newState;
@@ -3114,6 +3137,17 @@ public class MessageList
mSelectedCount = 0;
toggleBatchButtons();
}
+ else if (v == mBatchSpamButton)
+ {
+ String folderName = mAccount.getSpamFolderName();
+ if (K9.FOLDER_NONE.equalsIgnoreCase(folderName))
+ {
+ return;
+ }
+ mController.moveMessages(mAccount, mCurrentFolder.name, messageList.toArray(EMPTY_MESSAGE_ARRAY), folderName, null);
+ mSelectedCount = 0;
+ toggleBatchButtons();
+ }
else
{
mController.setFlag(messageList.toArray(EMPTY_MESSAGE_ARRAY), (v == mBatchReadButton ? Flag.SEEN : Flag.FLAGGED), newState);