mirror of
https://github.com/sp-tarkov/launcher.git
synced 2025-02-12 22:50:44 -05:00
fix autologin throwing error while off UI thread
This commit is contained in:
parent
72d8a66df5
commit
724744b9f6
@ -11,6 +11,7 @@ using Splat;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Avalonia.Threading;
|
||||||
|
|
||||||
namespace Aki.Launcher.ViewModels
|
namespace Aki.Launcher.ViewModels
|
||||||
{
|
{
|
||||||
@ -111,12 +112,11 @@ namespace Aki.Launcher.ViewModels
|
|||||||
//handle auto-login
|
//handle auto-login
|
||||||
if (LauncherSettingsProvider.Instance.UseAutoLogin && LauncherSettingsProvider.Instance.Server.AutoLoginCreds != null && !NoAutoLogin)
|
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();
|
LoginCommand.Execute();
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user