mirror of
https://github.com/immich-app/immich.git
synced 2025-07-13 20:38:46 +02:00
fix(mobile): no album thumbnail lead to no album selection shown and add global logs (#1841)
* fix(mobile): no album thumbnail lead to no album selection shown * add more log info * added global error handling * better place to init logger * get more log
This commit is contained in:
parent
98a8be82e2
commit
a2549c5bbd
4 changed files with 112 additions and 88 deletions
mobile/lib
|
@ -31,6 +31,7 @@ import 'package:immich_mobile/shared/views/version_announcement_overlay.dart';
|
|||
import 'package:immich_mobile/utils/immich_app_theme.dart';
|
||||
import 'package:immich_mobile/utils/migration.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'constants/hive_box.dart';
|
||||
|
||||
|
@ -72,6 +73,18 @@ Future<void> initApp() async {
|
|||
|
||||
// Initialize Immich Logger Service
|
||||
ImmichLogger().init();
|
||||
|
||||
var log = Logger("ImmichErrorLogger");
|
||||
|
||||
FlutterError.onError = (details) {
|
||||
FlutterError.presentError(details);
|
||||
log.severe(details.toString(), details, details.stack);
|
||||
};
|
||||
|
||||
PlatformDispatcher.instance.onError = (error, stack) {
|
||||
log.severe(error.toString(), error, stack);
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
Future<Isar> loadDb() async {
|
||||
|
@ -127,8 +140,9 @@ class ImmichAppState extends ConsumerState<ImmichApp>
|
|||
|
||||
ref.watch(releaseInfoProvider.notifier).checkGithubReleaseInfo();
|
||||
|
||||
ref.watch(notificationPermissionProvider.notifier)
|
||||
.getNotificationPermission();
|
||||
ref
|
||||
.watch(notificationPermissionProvider.notifier)
|
||||
.getNotificationPermission();
|
||||
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue