mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 00:25:10 -04:00
Move to next/previous message in message view if a message was moved.
Fixes issue 1621.
This commit is contained in:
parent
d56f786f88
commit
4f7ab92985
@ -863,13 +863,18 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
{
|
{
|
||||||
Message messageToDelete = mMessage;
|
Message messageToDelete = mMessage;
|
||||||
|
|
||||||
findSurroundingMessagesUid();
|
showNextMessage();
|
||||||
|
|
||||||
mMessageReferences.remove(mMessageReference);
|
|
||||||
|
|
||||||
MessagingController.getInstance(getApplication()).deleteMessages(
|
MessagingController.getInstance(getApplication()).deleteMessages(
|
||||||
new Message[] { messageToDelete },
|
new Message[] { messageToDelete },
|
||||||
null);
|
null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showNextMessage()
|
||||||
|
{
|
||||||
|
findSurroundingMessagesUid();
|
||||||
|
mMessageReferences.remove(mMessageReference);
|
||||||
|
|
||||||
if (mLastDirection == NEXT && mNextMessage != null)
|
if (mLastDirection == NEXT && mNextMessage != null)
|
||||||
{
|
{
|
||||||
@ -887,15 +892,11 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
{
|
{
|
||||||
onPrevious(K9.isAnimations());
|
onPrevious(K9.isAnimations());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void onClickSender()
|
private void onClickSender()
|
||||||
{
|
{
|
||||||
@ -1075,8 +1076,12 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||||||
switch (requestCode)
|
switch (requestCode)
|
||||||
{
|
{
|
||||||
case ACTIVITY_CHOOSE_FOLDER_MOVE:
|
case ACTIVITY_CHOOSE_FOLDER_MOVE:
|
||||||
|
Message messageToMove = mMessage;
|
||||||
|
|
||||||
|
showNextMessage();
|
||||||
|
|
||||||
MessagingController.getInstance(getApplication()).moveMessage(mAccount,
|
MessagingController.getInstance(getApplication()).moveMessage(mAccount,
|
||||||
srcFolderName, mMessage, destFolderName, null);
|
srcFolderName, messageToMove, destFolderName, null);
|
||||||
break;
|
break;
|
||||||
case ACTIVITY_CHOOSE_FOLDER_COPY:
|
case ACTIVITY_CHOOSE_FOLDER_COPY:
|
||||||
MessagingController.getInstance(getApplication()).copyMessage(mAccount,
|
MessagingController.getInstance(getApplication()).copyMessage(mAccount,
|
||||||
|
Loading…
Reference in New Issue
Block a user