From 9a85b91469b5028a93aac2f8ad0ba661eea2235d Mon Sep 17 00:00:00 2001 From: zaharchenko Date: Tue, 9 Apr 2019 09:27:19 +0400 Subject: [PATCH] Email does not appear in the new folder after moving #78 --- .../core/test/spec/imap/core/events/ImapEventsSpec.groovy | 5 ++--- .../com/haulmont/addon/imap/events/EmailMovedImapEvent.java | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/test/spec/imap/core/events/ImapEventsSpec.groovy b/modules/core/test/spec/imap/core/events/ImapEventsSpec.groovy index d189e54..cf479d7 100644 --- a/modules/core/test/spec/imap/core/events/ImapEventsSpec.groovy +++ b/modules/core/test/spec/imap/core/events/ImapEventsSpec.groovy @@ -406,9 +406,8 @@ class ImapEventsSpec extends Specification { imapEvents.count { it instanceof EmailMovedImapEvent && it.message.folder.name == "other-folder" && - it.message.msgUid == START_EMAIL_UID + 1 && - it.newFolderName == "other-folder" && - it.oldFolderName == "INBOX" + it.message.msgUid == START_EMAIL_UID && + it.oldFolder.name == "INBOX" } == 1 } diff --git a/modules/global/src/com/haulmont/addon/imap/events/EmailMovedImapEvent.java b/modules/global/src/com/haulmont/addon/imap/events/EmailMovedImapEvent.java index e5806fe..e41b9f5 100644 --- a/modules/global/src/com/haulmont/addon/imap/events/EmailMovedImapEvent.java +++ b/modules/global/src/com/haulmont/addon/imap/events/EmailMovedImapEvent.java @@ -13,6 +13,7 @@ public class EmailMovedImapEvent extends BaseImapEvent { private final ImapFolder oldFolder; @SuppressWarnings("WeakerAccess") + @Deprecated public EmailMovedImapEvent(ImapMessage message, String oldFolderName) { super(message); this.oldFolder = null;