added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry

This commit is contained in:
2026-07-06 15:43:17 +02:00
parent 614ab159af
commit 124b1a5177
34 changed files with 1866 additions and 409 deletions
@@ -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;