mirror of
https://github.com/chatmail/core.git
synced 2026-05-15 12:56:30 +03:00
Merge pull request #1491 from deltachat/fix-get-sent-folder1
Code style (#1488)
This commit is contained in:
@@ -135,7 +135,7 @@ impl async_imap::Authenticator for OAuth2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq)]
|
||||||
enum FolderMeaning {
|
enum FolderMeaning {
|
||||||
Unknown,
|
Unknown,
|
||||||
SentObjects,
|
SentObjects,
|
||||||
@@ -1065,18 +1065,12 @@ impl Imap {
|
|||||||
|
|
||||||
let sentbox_folder = folders
|
let sentbox_folder = folders
|
||||||
.iter()
|
.iter()
|
||||||
.find(|folder| match get_folder_meaning(folder) {
|
.find(|folder| get_folder_meaning(folder) == FolderMeaning::SentObjects)
|
||||||
FolderMeaning::SentObjects => true,
|
|
||||||
_ => false,
|
|
||||||
})
|
|
||||||
.or_else(|| {
|
.or_else(|| {
|
||||||
info!(context, "can't find sentbox by attributes, checking names");
|
info!(context, "can't find sentbox by attributes, checking names");
|
||||||
folders
|
folders.iter().find(|folder| {
|
||||||
.iter()
|
get_folder_meaning_by_name(folder) == FolderMeaning::SentObjects
|
||||||
.find(|folder| match get_folder_meaning_by_name(folder) {
|
})
|
||||||
FolderMeaning::SentObjects => true,
|
|
||||||
_ => false,
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
info!(context, "sentbox folder is {:?}", sentbox_folder);
|
info!(context, "sentbox folder is {:?}", sentbox_folder);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user