mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 15:36:30 +03:00
Search for Flag::Deleted and Flag::Seen with == instead of match
This commit is contained in:
committed by
holger krekel
parent
08c77c2668
commit
1fa9aa88a8
@@ -757,14 +757,8 @@ impl Imap {
|
||||
|
||||
if let Some(msg) = msgs.first() {
|
||||
// XXX put flags into a set and pass them to dc_receive_imf
|
||||
let is_deleted = msg.flags().any(|flag| match flag {
|
||||
Flag::Deleted => true,
|
||||
_ => false,
|
||||
});
|
||||
let is_seen = msg.flags().any(|flag| match flag {
|
||||
Flag::Seen => true,
|
||||
_ => false,
|
||||
});
|
||||
let is_deleted = msg.flags().any(|flag| flag == Flag::Deleted);
|
||||
let is_seen = msg.flags().any(|flag| flag == Flag::Seen);
|
||||
|
||||
if !is_deleted && msg.body().is_some() {
|
||||
let body = msg.body().unwrap_or_default();
|
||||
|
||||
Reference in New Issue
Block a user