mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Update Issue 2168
Respect "Return to list after delete" after pressing on "Archive", "Move", or "Spam" button. TODO: Change strings to reflect this change (e.g. "Return to list after move/delete")
This commit is contained in:
parent
90ee194d0f
commit
df0ae4e4bf
@ -1271,14 +1271,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
disableButtons();
|
disableButtons();
|
||||||
Message messageToDelete = mMessage;
|
Message messageToDelete = mMessage;
|
||||||
|
|
||||||
if (K9.messageViewReturnToList())
|
showNextMessageOrReturn();
|
||||||
{
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
showNextMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
MessagingController.getInstance(getApplication()).deleteMessages(
|
MessagingController.getInstance(getApplication()).deleteMessages(
|
||||||
new Message[] { messageToDelete },
|
new Message[] { messageToDelete },
|
||||||
@ -1306,7 +1299,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showNextMessage();
|
showNextMessageOrReturn();
|
||||||
MessagingController.getInstance(getApplication())
|
MessagingController.getInstance(getApplication())
|
||||||
.moveMessage(mAccount, srcFolder, messageToMove, dstFolder, null);
|
.moveMessage(mAccount, srcFolder, messageToMove, dstFolder, null);
|
||||||
}
|
}
|
||||||
@ -1331,11 +1324,23 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showNextMessage();
|
showNextMessageOrReturn();
|
||||||
MessagingController.getInstance(getApplication())
|
MessagingController.getInstance(getApplication())
|
||||||
.moveMessage(mAccount, srcFolder, messageToMove, dstFolder, null);
|
.moveMessage(mAccount, srcFolder, messageToMove, dstFolder, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showNextMessageOrReturn()
|
||||||
|
{
|
||||||
|
if (K9.messageViewReturnToList())
|
||||||
|
{
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
showNextMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void showNextMessage()
|
private void showNextMessage()
|
||||||
{
|
{
|
||||||
findSurroundingMessagesUid();
|
findSurroundingMessagesUid();
|
||||||
@ -1535,7 +1540,7 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
case ACTIVITY_CHOOSE_FOLDER_MOVE:
|
case ACTIVITY_CHOOSE_FOLDER_MOVE:
|
||||||
Message messageToMove = mMessage;
|
Message messageToMove = mMessage;
|
||||||
|
|
||||||
showNextMessage();
|
showNextMessageOrReturn();
|
||||||
|
|
||||||
MessagingController.getInstance(getApplication()).moveMessage(mAccount,
|
MessagingController.getInstance(getApplication()).moveMessage(mAccount,
|
||||||
srcFolderName, messageToMove, destFolderName, null);
|
srcFolderName, messageToMove, destFolderName, null);
|
||||||
|
Loading…
Reference in New Issue
Block a user