mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-12 16:50:43 -05:00
Merge pull request 'fix autologin throwing error while off UI thread' (!29) from waffle.lord/Launcher:fix/autologin into master
Reviewed-on: SPT-AKI/Launcher#29
This commit is contained in:
commit
d32956ea36
@ -11,6 +11,7 @@ using Splat;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reactive;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Threading;
|
||||
|
||||
namespace Aki.Launcher.ViewModels
|
||||
{
|
||||
@ -111,12 +112,11 @@ namespace Aki.Launcher.ViewModels
|
||||
//handle auto-login
|
||||
if (LauncherSettingsProvider.Instance.UseAutoLogin && LauncherSettingsProvider.Instance.Server.AutoLoginCreds != null && !NoAutoLogin)
|
||||
{
|
||||
Task.Run(() =>
|
||||
Login = LauncherSettingsProvider.Instance.Server.AutoLoginCreds;
|
||||
Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
Login = LauncherSettingsProvider.Instance.Server.AutoLoginCreds;
|
||||
LoginCommand.Execute();
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user