mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +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() {
|
if let Some(msg) = msgs.first() {
|
||||||
// XXX put flags into a set and pass them to dc_receive_imf
|
// XXX put flags into a set and pass them to dc_receive_imf
|
||||||
let is_deleted = msg.flags().any(|flag| match flag {
|
let is_deleted = msg.flags().any(|flag| flag == Flag::Deleted);
|
||||||
Flag::Deleted => true,
|
let is_seen = msg.flags().any(|flag| flag == Flag::Seen);
|
||||||
_ => false,
|
|
||||||
});
|
|
||||||
let is_seen = msg.flags().any(|flag| match flag {
|
|
||||||
Flag::Seen => true,
|
|
||||||
_ => false,
|
|
||||||
});
|
|
||||||
|
|
||||||
if !is_deleted && msg.body().is_some() {
|
if !is_deleted && msg.body().is_some() {
|
||||||
let body = msg.body().unwrap_or_default();
|
let body = msg.body().unwrap_or_default();
|
||||||
|
|||||||
Reference in New Issue
Block a user