diff --git a/project/Aki.Launcher.Base/Helpers/LauncherSettingsProvider.cs b/project/Aki.Launcher.Base/Helpers/LauncherSettingsProvider.cs index 771b513..1c51e8e 100644 --- a/project/Aki.Launcher.Base/Helpers/LauncherSettingsProvider.cs +++ b/project/Aki.Launcher.Base/Helpers/LauncherSettingsProvider.cs @@ -30,6 +30,7 @@ namespace Aki.Launcher.Helpers public void SaveSettings() { + Server.Url = Path.TrimEndingDirectorySeparator(Server.Url); Json.SaveWithFormatting(LauncherSettingsProvider.DefaultSettingsFileLocation, this, Formatting.Indented); } diff --git a/project/Aki.Launcher/ViewModels/ConnectServerViewModel.cs b/project/Aki.Launcher/ViewModels/ConnectServerViewModel.cs index ca5d1a6..a3805b3 100644 --- a/project/Aki.Launcher/ViewModels/ConnectServerViewModel.cs +++ b/project/Aki.Launcher/ViewModels/ConnectServerViewModel.cs @@ -33,11 +33,15 @@ namespace Aki.Launcher.ViewModels public async Task ConnectServer() { + LauncherSettingsProvider.Instance.AllowSettings = false; + if (!await ServerManager.LoadDefaultServerAsync(LauncherSettingsProvider.Instance.Server.Url)) { connectModel.ConnectionFailed = true; connectModel.InfoText = string.Format(LocalizationProvider.Instance.server_unavailable_format_1, LauncherSettingsProvider.Instance.Server.Name); + + LauncherSettingsProvider.Instance.AllowSettings = true; return; } @@ -57,6 +61,8 @@ namespace Aki.Launcher.ViewModels NavigateTo(new LoginViewModel(HostScreen, noAutoLogin)); } + + LauncherSettingsProvider.Instance.AllowSettings = true; } public void RetryCommand()