fix: image download complete notification shows an extra {file_name} template tag (#25936)

* [fix] Image download complete notification shows an extra {file_name} template tag

fixes https://github.com/immich-app/immich/issues/25690
added

```dart
final FileName = 'file_name'.t( args: {'file_name': '{filename}', }, );
```

* chore: fix formatting

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
Romo
2026-02-05 20:19:33 +01:00
committed by GitHub
parent fd49d7d566
commit 1b3c0e4f65

View File

@@ -27,17 +27,19 @@ import 'package:isar/isar.dart';
import 'package:path_provider/path_provider.dart';
void configureFileDownloaderNotifications() {
final fileName = 'file_name'.t(args: {'file_name': '{filename}'});
FileDownloader().configureNotificationForGroup(
kDownloadGroupImage,
running: TaskNotification('downloading_media'.t(), '${'file_name'.t()}: {filename}'),
complete: TaskNotification('download_finished'.t(), '${'file_name'.t()}: {filename}'),
running: TaskNotification('downloading_media'.t(), fileName),
complete: TaskNotification('download_finished'.t(), fileName),
progressBar: true,
);
FileDownloader().configureNotificationForGroup(
kDownloadGroupVideo,
running: TaskNotification('downloading_media'.t(), '${'file_name'.t()}: {filename}'),
complete: TaskNotification('download_finished'.t(), '${'file_name'.t()}: {filename}'),
running: TaskNotification('downloading_media'.t(), fileName),
complete: TaskNotification('download_finished'.t(), fileName),
progressBar: true,
);