aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/util.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2025-04-21 12:53:34 +0200
committerfiaxh <git@lightrise.org>2025-12-19 12:14:28 +0100
commit5fb3de6443eaf0d94f1ccd07dee94b124708fe16 (patch)
tree6c96cc222a0b7b0114c093c2b00abb1bda669c5f /libdino/src/service/util.vala
parentf777856517ce39c4004be61c2661cc15377648fc (diff)
Handle content type != mime type
Diffstat (limited to 'libdino/src/service/util.vala')
-rw-r--r--libdino/src/service/util.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala
index 6eacdd33..e85e2005 100644
--- a/libdino/src/service/util.vala
+++ b/libdino/src/service/util.vala
@@ -30,8 +30,10 @@ public class Util {
}
}
- public static bool is_pixbuf_supported_mime_type(string mime_type) {
- if (mime_type == null) return false;
+ public static bool is_pixbuf_supported_content_type(Xmpp.FileContentType? content_type) {
+ if (content_type == null) return false;
+
+ string mime_type = content_type.get_mime_type();
foreach (Gdk.PixbufFormat pixbuf_format in Gdk.Pixbuf.get_formats()) {
foreach (string pixbuf_mime in pixbuf_format.get_mime_types()) {