remove completely redundant code from batch archive/spam codepaths. (It

duplicated code in the batch move codepath)
This commit is contained in:
Jesse Vincent 2011-02-13 18:52:42 -05:00
parent 5c67e69ee4
commit be106c21a1
1 changed files with 0 additions and 34 deletions

View File

@ -2701,23 +2701,6 @@ public class MessageList
}
private void onArchiveBatch() {
if (!mController.isMoveCapable(mAccount)) {
return;
}
synchronized (mAdapter.messages) {
for (MessageInfoHolder holder : mAdapter.messages) {
if (holder.selected) {
Message message = holder.message;
if (!mController.isMoveCapable(message)) {
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
}
}
}
String folderName = mAccount.getArchiveFolderName();
if (K9.FOLDER_NONE.equalsIgnoreCase(folderName)) {
return;
@ -2726,23 +2709,6 @@ public class MessageList
}
private void onSpamBatch() {
if (!mController.isMoveCapable(mAccount)) {
return;
}
synchronized (mAdapter.messages) {
for (MessageInfoHolder holder : mAdapter.messages) {
if (holder.selected) {
Message message = holder.message;
if (!mController.isMoveCapable(message)) {
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
}
}
}
String folderName = mAccount.getSpamFolderName();
if (K9.FOLDER_NONE.equalsIgnoreCase(folderName)) {
return;