Compare commits

...

1 Commits

Author SHA1 Message Date
shenlong-tanwen 22c5add816 fix: do not log out on automatic url switch 2026-07-08 01:26:39 +05:30
+8 -1
View File
@@ -85,6 +85,7 @@ class ApiService {
// Save in local database for next startup
await Store.put(StoreKey.serverEndpoint, endpoint);
await updateHeaders();
return endpoint;
}
@@ -173,8 +174,14 @@ class ApiService {
static List<String> getServerUrls() {
final urls = <String>[];
// Include the original server URL so the native side can use it
// to sync the auth token to other external hosts
final serverUrl = Store.tryGet(StoreKey.serverUrl);
if (serverUrl != null && serverUrl.isNotEmpty) {
urls.add(serverUrl);
}
final serverEndpoint = Store.tryGet(StoreKey.serverEndpoint);
if (serverEndpoint != null && serverEndpoint.isNotEmpty) {
if (serverEndpoint != null && serverEndpoint.isNotEmpty && serverEndpoint != serverUrl) {
urls.add(serverEndpoint);
}
final network = SettingsRepository.instance.appConfig.network;