mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
fix current server
This commit is contained in:
parent
549bef1afb
commit
e5698c4c0c
3 changed files with 9 additions and 1 deletions
|
|
@ -138,6 +138,8 @@ public class ConfigurationMigrator : IHostedService
|
||||||
var currentServer = serverConfigV0.CurrentServer;
|
var currentServer = serverConfigV0.CurrentServer;
|
||||||
var currentServerIdx = Array.IndexOf(serverConfigV0.ServerStorage.Keys.ToArray(), currentServer);
|
var currentServerIdx = Array.IndexOf(serverConfigV0.ServerStorage.Keys.ToArray(), currentServer);
|
||||||
|
|
||||||
|
if (currentServerIdx == -1) currentServerIdx = 0;
|
||||||
|
|
||||||
migrated.CurrentServer = currentServerIdx;
|
migrated.CurrentServer = currentServerIdx;
|
||||||
migrated.ServerStorage = new();
|
migrated.ServerStorage = new();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>0.8.7</Version>
|
<Version>0.8.8</Version>
|
||||||
<Description></Description>
|
<Description></Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@ public class ServerConfigurationManager
|
||||||
_serverTagConfig = serverTagConfig;
|
_serverTagConfig = serverTagConfig;
|
||||||
_notesConfig = notesConfig;
|
_notesConfig = notesConfig;
|
||||||
_dalamudUtil = dalamudUtil;
|
_dalamudUtil = dalamudUtil;
|
||||||
|
|
||||||
|
if (_configService.Current.CurrentServer < 0)
|
||||||
|
{
|
||||||
|
_configService.Current.CurrentServer = 0;
|
||||||
|
_configService.Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string CurrentApiUrl => CurrentServer.ServerUri;
|
public string CurrentApiUrl => CurrentServer.ServerUri;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue