Update 2026-04-17
This commit is contained in:
1 parent
96de59e9be
commit
d1b4fb344e
6 files changed
+42
-14
No files matched your search
@@ -498,9 +498,18 @@ class DownloadHelper {
|
||||
'pptx',
|
||||
'rtf',
|
||||
'odt',
|
||||
'rar',
|
||||
'zip',
|
||||
'7z',
|
||||
].contains(ext);
|
||||
}
|
||||
|
||||
/// Check if file is an archive
|
||||
static bool isArchiveFile(String path) {
|
||||
final ext = getFileExtension(path);
|
||||
return ['zip', 'rar', '7z', 'tar', 'gz'].contains(ext);
|
||||
}
|
||||
|
||||
/// Check if file is video
|
||||
static bool isVideoFile(String path) {
|
||||
final ext = getFileExtension(path);
|
||||
@@ -524,6 +533,7 @@ class DownloadHelper {
|
||||
if (['doc', 'docx'].contains(ext)) return '📝';
|
||||
if (['xls', 'xlsx'].contains(ext)) return '📊';
|
||||
if (['ppt', 'pptx'].contains(ext)) return '📽️';
|
||||
if (isArchiveFile(path)) return '📦';
|
||||
}
|
||||
return '📎';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user