consolidate common process into resolveAndSetEndpoint

This commit is contained in:
Connery Noble
2023-01-14 16:41:10 -08:00
parent a485bb2010
commit 7a23c58be2
6 changed files with 34 additions and 21 deletions
+1 -4
View File
@@ -23,10 +23,7 @@ class SplashScreenPage extends HookConsumerWidget {
try {
if (loginInfo != null) {
// Resolve API server endpoint from user provided serverUrl
final serverEndpoint =
await apiService.resolveEndpoint(loginInfo.serverUrl);
apiService.setEndpoint(serverEndpoint);
Hive.box(userInfoBox).put(serverEndpointKey, serverEndpoint);
await apiService.resolveAndSetEndpoint(loginInfo.serverUrl);
var isSuccess = await ref
.read(authenticationProvider.notifier)