File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ namespace Dc {
211211 this . append (label);
212212 }
213213
214- private static bool is_image_file (Message msg ) {
214+ public static bool is_image_file (Message msg ) {
215215 if (msg. file_mime != null && msg. file_mime. has_prefix (" image/" ))
216216 return true ;
217217 if (msg. view_type != null ) {
Original file line number Diff line number Diff line change @@ -783,12 +783,7 @@ namespace Dc {
783783 show_toast (" File not available" );
784784 return ;
785785 }
786- bool is_img = (msg. file_mime != null && msg. file_mime. has_prefix (" image/" ));
787- if (! is_img && msg. view_type != null ) {
788- var vt = msg. view_type. down ();
789- is_img = (vt == " image" || vt == " gif" || vt == " sticker" );
790- }
791- if (is_img) {
786+ if (MessageRow . is_image_file (msg)) {
792787 image_viewer. show (msg. file_path);
793788 } else {
794789 save_attachment. begin (msg. file_path, msg. file_name);
You can’t perform that action at this time.
0 commit comments