mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Swapped calls to ObserveOnGuiThread()
This commit is contained in:
parent
88d9d5e6d2
commit
36a37a04a9
@ -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; }
|
||||
|
@ -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<AbstractDownloadState> GetDownloaderState(dynamic archiveINI)
|
||||
|
@ -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<CPUDisplayVM>.Ascending(s => s.StartTime))
|
||||
.ObserveOnGuiThread()
|
||||
.Bind(StatusList)
|
||||
.Subscribe()
|
||||
.DisposeWith(CompositeDisposable);
|
||||
|
@ -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<CPUDisplayVM>.Ascending(s => s.StartTime))
|
||||
.Bind(StatusList)
|
||||
.Subscribe()
|
||||
|
@ -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);
|
||||
|
@ -67,7 +67,7 @@ namespace Wabbajack
|
||||
return default(MemoryStream);
|
||||
}
|
||||
})
|
||||
.ObserveOn(RxApp.MainThreadScheduler)
|
||||
.ObserveOnGuiThread()
|
||||
.Select(memStream =>
|
||||
{
|
||||
if (memStream == null) return default(BitmapImage);
|
||||
|
@ -64,7 +64,7 @@ namespace Wabbajack
|
||||
return default;
|
||||
}
|
||||
})
|
||||
.ObserveOn(RxApp.MainThreadScheduler)
|
||||
.ObserveOnGuiThread()
|
||||
.Select(memStream =>
|
||||
{
|
||||
if (memStream == null) return default;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user