TF-3450 Add text attachment preview

This commit is contained in:
DatDang
2025-02-20 10:24:58 +07:00
committed by Dat H. Pham
parent 3645fe58f9
commit ef1d37f7ac
9 changed files with 150 additions and 0 deletions
@@ -42,4 +42,8 @@ extension AttachmentExtension on Attachment {
bool get isHTMLFile => type?.isHTMLFile(fileName: name) ?? false;
bool get isImage => type?.isImageFile() ?? false;
bool get isText => (type?.isTextFile() ?? false)
|| name?.endsWith('.txt') == true
|| name?.endsWith('.md') == true;
}