diff --git a/python/tests/test_1_online.py b/python/tests/test_1_online.py index a52e3bfa2..ab44b0828 100644 --- a/python/tests/test_1_online.py +++ b/python/tests/test_1_online.py @@ -1776,7 +1776,7 @@ def test_group_quote(acfactory, lp): "xyz", False, "xyz", - ), # Test that emails aren't found in a random folder + ), # Test that emails are recognized in a random folder but not moved ( "xyz", True, @@ -1806,7 +1806,7 @@ def test_scan_folders(acfactory, lp, folder, move, expected_destination): ac1.stop_io() assert folder in ac1.direct_imap.list_folders() - lp.sec("Send a message to from ac2 to ac1 and manually move it to `folder`") + lp.sec("Send a message to from ac2 to ac1 and manually move it to the mvbox") ac1.direct_imap.select_config_folder("inbox") with ac1.direct_imap.idle() as idle1: acfactory.get_accepted_chat(ac2, ac1).send_text("hello") @@ -1816,17 +1816,10 @@ def test_scan_folders(acfactory, lp, folder, move, expected_destination): lp.sec("start_io() and see if DeltaChat finds the message (" + variant + ")") ac1.set_config("scan_all_folders_debounce_secs", "0") ac1.start_io() - chat = ac1.create_chat(ac2) - n_msgs = 1 # "Messages are end-to-end encrypted." - if folder == "Spam": - msg = ac1._evtracker.wait_next_incoming_message() - assert msg.text == "hello" - n_msgs += 1 - else: - ac1._evtracker.wait_idle_inbox_ready() - assert len(chat.get_messages()) == n_msgs + msg = ac1._evtracker.wait_next_incoming_message() + assert msg.text == "hello" - # The message has reached its destination. + # The message has been downloaded, which means it has reached its destination. ac1.direct_imap.select_folder(expected_destination) assert len(ac1.direct_imap.get_all_messages()) == 1 if folder != expected_destination: diff --git a/src/imap.rs b/src/imap.rs index 0a9fbd0e1..6188fd6f5 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -823,10 +823,7 @@ impl Session { .context("listing folders for resync")?; for folder in all_folders { let folder_meaning = get_folder_meaning(&folder); - if !matches!( - folder_meaning, - FolderMeaning::Virtual | FolderMeaning::Unknown - ) { + if folder_meaning != FolderMeaning::Virtual { self.resync_folder_uids(context, folder.name(), folder_meaning) .await?; } diff --git a/src/imap/scan_folders.rs b/src/imap/scan_folders.rs index ed4b6f215..e500f719e 100644 --- a/src/imap/scan_folders.rs +++ b/src/imap/scan_folders.rs @@ -74,7 +74,6 @@ impl Imap { // Don't scan folders that are watched anyway if !watched_folders.contains(&folder.name().to_string()) && folder_meaning != FolderMeaning::Trash - && folder_meaning != FolderMeaning::Unknown { self.fetch_move_delete(context, session, folder.name(), folder_meaning) .await