Observe R3 events on threadpool v2
This commit is contained in:
@@ -17,7 +17,7 @@ public partial class ForwardBackwardButtonContainer : HBoxContainer
|
||||
_forwardButton = GetNode<Button>("ForwardButton");
|
||||
_backwardButton.Pressed += OnBackwardButtonPressed;
|
||||
_forwardButton.Pressed += OnForwardButtonPressed;
|
||||
_navigationHistoryService.Current.SubscribeOnThreadPool().SubscribeAwait(async (s, ct) =>
|
||||
_navigationHistoryService.Current.SubscribeOnThreadPool().ObserveOnThreadPool().SubscribeAwait(async (s, ct) =>
|
||||
{
|
||||
await this.InvokeAsync(() =>
|
||||
{
|
||||
|
||||
@@ -67,7 +67,8 @@ public partial class ProblemsPanel : Control
|
||||
treeItem.SetMetadata(0, new RefCountedContainer<SharpIdeProjectModel>(e.NewItem.Value));
|
||||
e.NewItem.View.Value = treeItem;
|
||||
|
||||
Observable.EveryValueChanged(e.NewItem.Value, s => s.Diagnostics.Count).Subscribe(s => treeItem.Visible = s is not 0).AddTo(this);
|
||||
Observable.EveryValueChanged(e.NewItem.Value, s => s.Diagnostics.Count).SubscribeOnThreadPool().ObserveOnThreadPool()
|
||||
.Subscribe(s => treeItem.Visible = s is not 0).AddTo(this);
|
||||
|
||||
var projectDiagnosticsView = e.NewItem.Value.Diagnostics.CreateView(y => new TreeItemContainer());
|
||||
projectDiagnosticsView.ObserveChanged().SubscribeOnThreadPool().ObserveOnThreadPool()
|
||||
|
||||
@@ -250,7 +250,7 @@ public partial class SolutionExplorerPanel : MarginContainer
|
||||
folderItem.SetMetadata(0, new RefCountedContainer<SharpIdeFolder>(sharpIdeFolder));
|
||||
|
||||
Observable.EveryValueChanged(sharpIdeFolder, folder => folder.Name)
|
||||
.Skip(1).SubscribeAwait(async (s, ct) =>
|
||||
.Skip(1).SubscribeOnThreadPool().ObserveOnThreadPool().SubscribeAwait(async (s, ct) =>
|
||||
{
|
||||
await this.InvokeAsync(() => folderItem.SetText(0, s));
|
||||
}).AddTo(this);
|
||||
@@ -301,7 +301,7 @@ public partial class SolutionExplorerPanel : MarginContainer
|
||||
fileItem.SetMetadata(0, new RefCountedContainer<SharpIdeFile>(sharpIdeFile));
|
||||
|
||||
Observable.EveryValueChanged(sharpIdeFile, file => file.Name)
|
||||
.Skip(1).SubscribeAwait(async (s, ct) =>
|
||||
.Skip(1).SubscribeOnThreadPool().ObserveOnThreadPool().SubscribeAwait(async (s, ct) =>
|
||||
{
|
||||
await this.InvokeAsync(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user