use observeon
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerViewModel.cs
@@ -65,9 +65,9 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Observable
.FromEventPattern<Wallet>(WalletManager, nameof(WalletManager.WalletAdded))
- .ObserveOn(RxApp.MainThreadScheduler)
.Select(x => x.EventArgs)
.Where(x => x is { })
+ .ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(wallet =>
{
WalletViewModelBase vm = (wallet.State <= WalletState.Starting) ?
@@ -97,11 +97,13 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
.WhenAnyValue(x => x.SelectedDocument)
.OfType<ViewModelBase>()
.Where(x => x != SelectedItem)
+ .ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(x => OnShellDocumentSelected(x));
this.WhenAnyValue(x => x.SelectedItem)
.OfType<WasabiDocumentTabViewModel>()
.Where(_ => !_inSelecting)
+ .ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(x => shell.AddOrSelectDocument(x));
}

use observeon