added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry
This commit is contained in:
@@ -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