added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry
This commit is contained in:
1 parent
614ab159af
commit
124b1a5177
34 files changed
+1866
-409
No files matched your search
@@ -19,6 +19,17 @@ IconData iconForFile(CacheableFile file) {
|
||||
return Icons.insert_drive_file_outlined;
|
||||
}
|
||||
|
||||
/// Icon for a bare file name (no [CacheableFile] / MIME available), e.g. in the
|
||||
/// downloads overview. Falls back to a generic document icon.
|
||||
IconData iconForFileName(String name) {
|
||||
final ext = _extensionOf(name);
|
||||
if (ext != null) {
|
||||
final byExt = _extensionIcons[ext];
|
||||
if (byExt != null) return byExt;
|
||||
}
|
||||
return Icons.insert_drive_file_outlined;
|
||||
}
|
||||
|
||||
String? _extensionOf(String name) {
|
||||
final dot = name.lastIndexOf('.');
|
||||
if (dot <= 0 || dot == name.length - 1) return null;
|
||||
|
||||
Reference in new issue
Block a user