0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-12 17:30:42 -05:00

Merge pull request 'Merge 382 into master' (!49) from 3.8.2-DEV into master

Reviewed-on: SPT-AKI/Launcher#49
This commit is contained in:
chomp 2024-05-13 10:24:19 +00:00
commit 052511c686
2 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,7 @@ namespace Aki.Launcher.Helpers
public void SaveSettings()
{
Server.Url = Path.TrimEndingDirectorySeparator(Server.Url);
Json.SaveWithFormatting(LauncherSettingsProvider.DefaultSettingsFileLocation, this, Formatting.Indented);
}

View File

@ -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()