mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Restore ability to delete server-side messages for POP3 and WebDAV
This commit is contained in:
parent
014691bac9
commit
6d5b158787
@ -1437,12 +1437,6 @@ s * critical data as fast as possible, and then we'll fill in the de
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteDestFolder.open(OpenMode.READ_WRITE);
|
|
||||||
if (remoteDestFolder.getMode() != OpenMode.READ_WRITE) {
|
|
||||||
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: could not open remoteDestFolder " + srcFolder + " read/write");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Message remoteMessage = null;
|
Message remoteMessage = null;
|
||||||
if (!uid.startsWith("Local")
|
if (!uid.startsWith("Local")
|
||||||
&& !uid.contains("-")) {
|
&& !uid.contains("-")) {
|
||||||
@ -1454,11 +1448,24 @@ s * critical data as fast as possible, and then we'll fill in the de
|
|||||||
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: remoteMessage " + uid + " does not exist");
|
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: remoteMessage " + uid + " does not exist");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.LOGD)
|
if (Config.LOGD)
|
||||||
{
|
{
|
||||||
Log.d(Email.LOG_TAG, "processingPendingMoveOrCopy: source folder = " + srcFolder
|
Log.d(Email.LOG_TAG, "processingPendingMoveOrCopy: source folder = " + srcFolder
|
||||||
+ ", uid = " + uid + ", destination folder = " + destFolder + ", isCopy = " + isCopy);
|
+ ", uid = " + uid + ", destination folder = " + destFolder + ", isCopy = " + isCopy);
|
||||||
}
|
}
|
||||||
|
if (isCopy == false && destFolder.equals(account.getTrashFolderName()))
|
||||||
|
{
|
||||||
|
Log.d(Email.LOG_TAG, "processingPendingMoveOrCopy doing special case for deleting message");
|
||||||
|
remoteMessage.delete(account.getTrashFolderName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
remoteDestFolder.open(OpenMode.READ_WRITE);
|
||||||
|
if (remoteDestFolder.getMode() != OpenMode.READ_WRITE) {
|
||||||
|
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: could not open remoteDestFolder " + srcFolder + " read/write");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isCopy) {
|
if (isCopy) {
|
||||||
remoteSrcFolder.copyMessages(new Message[] { remoteMessage }, remoteDestFolder);
|
remoteSrcFolder.copyMessages(new Message[] { remoteMessage }, remoteDestFolder);
|
||||||
|
Loading…
Reference in New Issue
Block a user