From 27bf4c37a7861cb394cb5676ecabaceddfe15f70 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Wed, 29 May 2024 19:55:15 -0300 Subject: [PATCH] feat: Map *.wav to Viewtype::Audio (#5633) It seems there are no problems with playing WAV on all modern platforms, so such files should be displayed in the "AUDIO", not "FILES" tab in the UIs. --- src/message.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message.rs b/src/message.rs index 9f6ee2c5d..85093b744 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1433,7 +1433,7 @@ pub(crate) fn guess_msgtype_from_suffix(path: &Path) -> Option<(Viewtype, &str)> "txt" => (Viewtype::File, "text/plain"), "vcard" => (Viewtype::Vcard, "text/vcard"), "vcf" => (Viewtype::Vcard, "text/vcard"), - "wav" => (Viewtype::File, "audio/wav"), + "wav" => (Viewtype::Audio, "audio/wav"), "weba" => (Viewtype::File, "audio/webm"), "webm" => (Viewtype::Video, "video/webm"), "webp" => (Viewtype::Image, "image/webp"), // iOS via SDWebImage, Android since 4.0