diff --git a/src/Uno.Extensions.Reactive.UI/View/FeedView.Refresh.cs b/src/Uno.Extensions.Reactive.UI/View/FeedView.Refresh.cs index 62046263d4..1c664a544f 100644 --- a/src/Uno.Extensions.Reactive.UI/View/FeedView.Refresh.cs +++ b/src/Uno.Extensions.Reactive.UI/View/FeedView.Refresh.cs @@ -61,7 +61,7 @@ public void Execute(object? parameter) { try { - subscription.RequestRefresh(() => IsExecuting = false); + subscription.RequestRefresh(EndExecution); } catch (Exception error) { @@ -69,9 +69,16 @@ public void Execute(object? parameter) { this.Log().Warn(error, "Failed to send a refresh request"); } - IsExecuting = false; + EndExecution(); } }); + + void EndExecution() +#if WINUI + => _ = _view.DispatcherQueue.TryEnqueue(() => IsExecuting = false); +#else + => _ = _view.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => IsExecuting = false); +#endif } } }