You've already forked immich
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:
@ -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
|
||||
|
Reference in New Issue
Block a user