1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-16 07:24:40 +02:00

fix(mobile): notification, dialog that don't translate properly (#18827)

* Fix notification, dialog that don't translate properly

* use localeProvider to re-build

---------

Co-authored-by: dvbthien <dvbthien@gmail.com>
This commit is contained in:
Thien Dang
2025-06-02 09:03:22 +07:00
committed by GitHub
parent 36506250c4
commit a53d033622
3 changed files with 21 additions and 12 deletions

View File

@ -89,18 +89,6 @@ Future<void> initApp() async {
initializeTimeZones();
FileDownloader().configureNotification(
running: TaskNotification(
'downloading_media'.tr(),
'file: {filename}',
),
complete: TaskNotification(
'download_finished'.tr(),
'file: {filename}',
),
progressBar: true,
);
await FileDownloader().trackTasksInGroup(
downloadGroupLivePhoto,
markDownloadedComplete: false,
@ -167,10 +155,27 @@ class ImmichAppState extends ConsumerState<ImmichApp>
await ref.read(localNotificationService).setup();
}
void _configureFileDownloaderNotifications() {
FileDownloader().configureNotification(
running: TaskNotification(
'downloading_media'.tr(),
'${'file_name'.tr()}: {filename}',
),
complete: TaskNotification(
'download_finished'.tr(),
'${'file_name'.tr()}: {filename}',
),
progressBar: true,
);
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
Intl.defaultLocale = context.locale.toLanguageTag();
WidgetsBinding.instance.addPostFrameCallback((_) {
_configureFileDownloaderNotifications();
});
}
@override