Skip to content

Commit

Permalink
log connection info instead
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 committed Dec 2, 2024
1 parent 58a6ca6 commit 72ba8ac
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mobile/lib/pages/common/splash_screen.page.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/providers/backup/backup.provider.dart';
import 'package:immich_mobile/providers/auth.provider.dart';
import 'package:immich_mobile/providers/gallery_permission.provider.dart';
Expand All @@ -25,9 +24,18 @@ class SplashScreenPageState extends ConsumerState<SplashScreenPage> {
ref
.read(authProvider.notifier)
.setOpenApiServiceEndpoint()
.then(logConnectionInfo)
.whenComplete(() => resumeSession());
}

void logConnectionInfo(String? endpoint) {
if (endpoint == null) {
return;
}

log.info("Resuming session at $endpoint");
}

void resumeSession() async {
final serverUrl = Store.tryGet(StoreKey.serverUrl);
final endpoint = Store.tryGet(StoreKey.serverEndpoint);
Expand Down

0 comments on commit 72ba8ac

Please sign in to comment.