change SVG Viewtype to Image, again

This commit is contained in:
adbenitez
2021-12-24 00:43:04 -05:00
parent 2a11f8f59d
commit 2f6758ffe4
2 changed files with 1 additions and 2 deletions

View File

@@ -1232,7 +1232,7 @@ pub fn guess_msgtype_from_suffix(path: &Path) -> Option<(Viewtype, &str)> {
"rar" => (Viewtype::File, "application/vnd.rar"), "rar" => (Viewtype::File, "application/vnd.rar"),
"rtf" => (Viewtype::File, "application/rtf"), "rtf" => (Viewtype::File, "application/rtf"),
"spx" => (Viewtype::File, "audio/ogg"), // Ogg Speex Profile "spx" => (Viewtype::File, "audio/ogg"), // Ogg Speex Profile
"svg" => (Viewtype::File, "image/svg+xml"), "svg" => (Viewtype::Image, "image/svg+xml"),
"tgs" => (Viewtype::Sticker, "application/x-tgsticker"), "tgs" => (Viewtype::Sticker, "application/x-tgsticker"),
"tiff" => (Viewtype::File, "image/tiff"), "tiff" => (Viewtype::File, "image/tiff"),
"tif" => (Viewtype::File, "image/tiff"), "tif" => (Viewtype::File, "image/tiff"),

View File

@@ -1537,7 +1537,6 @@ fn get_mime_type(mail: &mailparse::ParsedMail<'_>) -> Result<(Mime, Viewtype)> {
} }
mime::IMAGE => match mimetype.subtype() { mime::IMAGE => match mimetype.subtype() {
mime::GIF => Viewtype::Gif, mime::GIF => Viewtype::Gif,
mime::SVG => Viewtype::File,
_ => Viewtype::Image, _ => Viewtype::Image,
}, },
mime::AUDIO => Viewtype::Audio, mime::AUDIO => Viewtype::Audio,