mirror of
https://github.com/moparisthebest/k-9
synced 2024-08-13 17:03:48 -04:00
remove completely redundant code from batch archive/spam codepaths. (It
duplicated code in the batch move codepath)
This commit is contained in:
parent
5c67e69ee4
commit
be106c21a1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user