Minor cleanup of Viewtype

Provide checking for attachment as a method and move it to the message
module.  The method is a lot easier to read and have correct
expectations about.
This commit is contained in:
Floris Bruynooghe
2022-03-06 17:54:23 +01:00
parent 50f13cb84b
commit f9ee70aa2e
28 changed files with 204 additions and 201 deletions

View File

@@ -14,8 +14,7 @@ use sha2::{Digest, Sha256};
use crate::chat::{self, Chat, ChatId, ChatIdBlocked, ProtectionStatus};
use crate::config::Config;
use crate::constants::{
Blocked, Chattype, ShowEmails, Viewtype, DC_CHAT_ID_TRASH, DC_CONTACT_ID_LAST_SPECIAL,
DC_CONTACT_ID_SELF,
Blocked, Chattype, ShowEmails, DC_CHAT_ID_TRASH, DC_CONTACT_ID_LAST_SPECIAL, DC_CONTACT_ID_SELF,
};
use crate::contact::{
addr_cmp, may_be_valid_addr, normalize_name, Contact, ContactId, Origin, VerifiedStatus,
@@ -28,7 +27,9 @@ use crate::events::EventType;
use crate::headerdef::{HeaderDef, HeaderDefMap};
use crate::job::{self, Action};
use crate::log::LogExt;
use crate::message::{self, rfc724_mid_exists, Message, MessageState, MessengerMessage, MsgId};
use crate::message::{
self, rfc724_mid_exists, Message, MessageState, MessengerMessage, MsgId, Viewtype,
};
use crate::mimeparser::{
parse_message_id, parse_message_ids, AvatarAction, MailinglistType, MimeMessage, SystemMessage,
};