reverse method
Reverses the result so that the original sequence and mailbox becomes the target ones.
Throws MailException when either the targetSequence or the
targetMailbox are null.
Implementation
MoveResult reverse() {
final targetSequence = this.targetSequence;
final targetMailbox = this.targetMailbox;
if (targetSequence == null || targetMailbox == null) {
throw MailException(
mailClient,
'Unable to reverse move operation without target sequence',
);
}
return MoveResult(
action,
targetSequence,
targetMailbox,
originalSequence,
originalMailbox,
mailClient,
canUndo: canUndo,
messages: messages,
);
}