TF-3450 Add text attachment preview
This commit is contained in:
@@ -5,6 +5,11 @@ class SupportedPreviewFileTypes {
|
||||
'image/gif',
|
||||
'image/png',];
|
||||
|
||||
static const textMimeTypes = [
|
||||
'text/plain',
|
||||
'text/markdown',
|
||||
];
|
||||
|
||||
static const docMimeTypes = [
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.oasis.opendocument.text',
|
||||
|
||||
@@ -21,6 +21,8 @@ extension MediaTypeExtension on MediaType {
|
||||
|
||||
bool isRtfFile() => SupportedPreviewFileTypes.rtfMimeTypes.contains(mimeType);
|
||||
|
||||
bool isTextFile() => SupportedPreviewFileTypes.textMimeTypes.contains(mimeType);
|
||||
|
||||
DocumentUti getDocumentUti() => DocumentUti(SupportedPreviewFileTypes.iOSSupportedTypes[mimeType]);
|
||||
|
||||
String getIcon(ImagePaths imagePaths, {String? fileName}) {
|
||||
|
||||
Reference in New Issue
Block a user