mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 03:16:29 +03:00
feat: Don't fetch messages from unknown folders (#7190)
Actually this leads to fetching messages only from watched folders and Spam. Motivation: - At least Gmail has virtual folders which aren't correctly detected as such, e.g. "Sent". - At least Gmail has many virtual folders and scanning all of them takes significant time, 5-6 secs in median for me. This slows down receiving new messages and consumes battery. - Delta Chat shouldn't fetch messages from folders potentially created by other apps for their own purposes. NB: All compatible Delta Chat forks should use the "DeltaChat" folder as mvbox. - Fetching from folders that aren't watched, e.g. from "Sent", may lead to message ordering issues.
This commit is contained in:
@@ -75,6 +75,7 @@ impl Imap {
|
||||
if !watched_folders.contains(&folder.name().to_string())
|
||||
&& folder_meaning != FolderMeaning::Drafts
|
||||
&& folder_meaning != FolderMeaning::Trash
|
||||
&& folder_meaning != FolderMeaning::Unknown
|
||||
{
|
||||
self.fetch_move_delete(context, session, folder.name(), folder_meaning)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user