diff --git a/Wabbajack.Lib/Downloaders/AbstractNeedsLoginDownloader.cs b/Wabbajack.Lib/Downloaders/AbstractNeedsLoginDownloader.cs index 1bead261..46f5937f 100644 --- a/Wabbajack.Lib/Downloaders/AbstractNeedsLoginDownloader.cs +++ b/Wabbajack.Lib/Downloaders/AbstractNeedsLoginDownloader.cs @@ -42,10 +42,10 @@ namespace Wabbajack.Lib.Downloaders TriggerLogin = ReactiveCommand.CreateFromTask( execute: () => Utils.CatchAndLog(async () => await Utils.Log(new RequestSiteLogin(this)).Task), - canExecute: IsLoggedIn.Select(b => !b).ObserveOn(RxApp.MainThreadScheduler)); + canExecute: IsLoggedIn.Select(b => !b).ObserveOnGuiThread()); ClearLogin = ReactiveCommand.Create( execute: () => Utils.CatchAndLog(() => Utils.DeleteEncryptedJson(_encryptedKeyName)), - canExecute: IsLoggedIn.ObserveOn(RxApp.MainThreadScheduler)); + canExecute: IsLoggedIn.ObserveOnGuiThread()); } public ICommand TriggerLogin { get; } diff --git a/Wabbajack.Lib/Downloaders/NexusDownloader.cs b/Wabbajack.Lib/Downloaders/NexusDownloader.cs index 43edb37d..3e66e7a3 100644 --- a/Wabbajack.Lib/Downloaders/NexusDownloader.cs +++ b/Wabbajack.Lib/Downloaders/NexusDownloader.cs @@ -42,10 +42,10 @@ namespace Wabbajack.Lib.Downloaders TriggerLogin = ReactiveCommand.CreateFromTask( execute: () => Utils.CatchAndLog(NexusApiClient.RequestAndCacheAPIKey), - canExecute: IsLoggedIn.Select(b => !b).ObserveOn(RxApp.MainThreadScheduler)); + canExecute: IsLoggedIn.Select(b => !b).ObserveOnGuiThread()); ClearLogin = ReactiveCommand.Create( execute: () => Utils.CatchAndLog(() => Utils.DeleteEncryptedJson("nexusapikey")), - canExecute: IsLoggedIn.ObserveOn(RxApp.MainThreadScheduler)); + canExecute: IsLoggedIn.ObserveOnGuiThread()); } public async Task GetDownloaderState(dynamic archiveINI) diff --git a/Wabbajack/View Models/Compilers/CompilerVM.cs b/Wabbajack/View Models/Compilers/CompilerVM.cs index 1e6f1a20..0eb3dd33 100644 --- a/Wabbajack/View Models/Compilers/CompilerVM.cs +++ b/Wabbajack/View Models/Compilers/CompilerVM.cs @@ -1,4 +1,4 @@ -using DynamicData; +using DynamicData; using DynamicData.Binding; using ReactiveUI; using ReactiveUI.Fody.Helpers; @@ -123,7 +123,7 @@ namespace Wabbajack // Throttle so that it only loads image after any sets of swaps have completed .Throttle(TimeSpan.FromMilliseconds(50), RxApp.TaskpoolScheduler) .DistinctUntilChanged() - .ObserveOn(RxApp.MainThreadScheduler) + .ObserveOnGuiThread() .Select(path => { if (string.IsNullOrWhiteSpace(path)) return UIUtils.BitmapImageFromResource("Resources/Wabba_Mouth_No_Text.png"); @@ -172,8 +172,8 @@ namespace Wabbajack .Batch(TimeSpan.FromMilliseconds(50), RxApp.TaskpoolScheduler) .EnsureUniqueChanges() .Filter(i => i.Status.IsWorking && i.Status.ID != WorkQueue.UnassignedCpuId) - .ObserveOn(RxApp.MainThreadScheduler) .Sort(SortExpressionComparer.Ascending(s => s.StartTime)) + .ObserveOnGuiThread() .Bind(StatusList) .Subscribe() .DisposeWith(CompositeDisposable); diff --git a/Wabbajack/View Models/Installers/InstallerVM.cs b/Wabbajack/View Models/Installers/InstallerVM.cs index d27520ad..8fa96f86 100644 --- a/Wabbajack/View Models/Installers/InstallerVM.cs +++ b/Wabbajack/View Models/Installers/InstallerVM.cs @@ -317,7 +317,7 @@ namespace Wabbajack .Batch(TimeSpan.FromMilliseconds(50), RxApp.TaskpoolScheduler) .EnsureUniqueChanges() .Filter(i => i.Status.IsWorking && i.Status.ID != WorkQueue.UnassignedCpuId) - .ObserveOn(RxApp.MainThreadScheduler) + .ObserveOnGuiThread() .Sort(SortExpressionComparer.Ascending(s => s.StartTime)) .Bind(StatusList) .Subscribe() diff --git a/Wabbajack/View Models/MainWindowVM.cs b/Wabbajack/View Models/MainWindowVM.cs index ddd70b8a..3785150a 100644 --- a/Wabbajack/View Models/MainWindowVM.cs +++ b/Wabbajack/View Models/MainWindowVM.cs @@ -63,8 +63,8 @@ namespace Wabbajack .ToObservableChangeSet() .Buffer(TimeSpan.FromMilliseconds(250), RxApp.TaskpoolScheduler) .Where(l => l.Count > 0) - .ObserveOn(RxApp.MainThreadScheduler) .FlattenBufferResult() + .ObserveOnGuiThread() .Bind(Log) .Subscribe() .DisposeWith(CompositeDisposable); diff --git a/Wabbajack/View Models/ModListVM.cs b/Wabbajack/View Models/ModListVM.cs index 17bb3076..f504b620 100644 --- a/Wabbajack/View Models/ModListVM.cs +++ b/Wabbajack/View Models/ModListVM.cs @@ -67,7 +67,7 @@ namespace Wabbajack return default(MemoryStream); } }) - .ObserveOn(RxApp.MainThreadScheduler) + .ObserveOnGuiThread() .Select(memStream => { if (memStream == null) return default(BitmapImage); diff --git a/Wabbajack/View Models/ModVM.cs b/Wabbajack/View Models/ModVM.cs index 9e2344b7..cdfe3efe 100644 --- a/Wabbajack/View Models/ModVM.cs +++ b/Wabbajack/View Models/ModVM.cs @@ -64,7 +64,7 @@ namespace Wabbajack return default; } }) - .ObserveOn(RxApp.MainThreadScheduler) + .ObserveOnGuiThread() .Select(memStream => { if (memStream == null) return default; diff --git a/Wabbajack/View Models/SlideShow.cs b/Wabbajack/View Models/SlideShow.cs index 1797e42b..92b39917 100644 --- a/Wabbajack/View Models/SlideShow.cs +++ b/Wabbajack/View Models/SlideShow.cs @@ -108,7 +108,7 @@ namespace Wabbajack return query.Items.ElementAtOrDefault(index); }) .StartWith(default(ModVM)) - .ObserveOn(RxApp.MainThreadScheduler) + .ObserveOnGuiThread() .ToProperty(this, nameof(TargetMod)); // Mark interest and materialize image of target mod