mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
feat(mobile): Auto switching server URLs (#14437)
This commit is contained in:
parent
3c38851d50
commit
055f1fc72f
38 changed files with 1828 additions and 108 deletions
|
|
@ -67,7 +67,7 @@ class ApiService implements Authentication {
|
|||
}
|
||||
|
||||
Future<String> resolveAndSetEndpoint(String serverUrl) async {
|
||||
final endpoint = await _resolveEndpoint(serverUrl);
|
||||
final endpoint = await resolveEndpoint(serverUrl);
|
||||
setEndpoint(endpoint);
|
||||
|
||||
// Save in local database for next startup
|
||||
|
|
@ -82,7 +82,7 @@ class ApiService implements Authentication {
|
|||
/// host - required
|
||||
/// port - optional (default: based on schema)
|
||||
/// path - optional
|
||||
Future<String> _resolveEndpoint(String serverUrl) async {
|
||||
Future<String> resolveEndpoint(String serverUrl) async {
|
||||
final url = sanitizeUrl(serverUrl);
|
||||
|
||||
if (!await _isEndpointAvailable(serverUrl)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue