1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

fix(mobiile): Fixed load translations in background sync (#1810)

* fixed regression where i accidentally removed load translations from the background sync

* only for android

---------

Co-authored-by: Marty Fuhry <marty@fuhry.farm>
This commit is contained in:
martyfuhry 2023-02-20 22:44:14 -05:00 committed by GitHub
parent 98998cccbc
commit 2d2cfb0349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import 'package:flutter/widgets.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/constants/hive_box.dart';
import 'package:immich_mobile/modules/backup/background_service/localization.dart';
import 'package:immich_mobile/modules/backup/models/current_upload_asset.model.dart';
import 'package:immich_mobile/modules/backup/models/error_upload_asset.model.dart';
import 'package:immich_mobile/modules/backup/models/hive_backup_albums.model.dart';
@ -312,6 +313,13 @@ class BackgroundService {
debugPrint("[_callHandler] could not acquire lock, exiting");
return false;
}
// Notifications aren't enabled in iOS yet, and this line
// below crashes the iOS background service
if (Platform.isAndroid) {
await loadTranslations();
}
final bool ok = await _onAssetsChanged();
return ok;
} catch (error) {