Skip to content

Commit 18983a5

Browse files
authored
fix Command Scheduler not set to immediate where required for CanExecute (#2849)
1 parent 77e217d commit 18983a5

File tree

7 files changed

+73
-67
lines changed

7 files changed

+73
-67
lines changed

src/ReactiveUI.AndroidX/ReactiveUI.AndroidX.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
44
<TargetFrameworks>MonoAndroid10.0</TargetFrameworks>
@@ -11,10 +11,10 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
14-
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.3.1" />
15-
<PackageReference Include="Xamarin.AndroidX.Fragment" Version="1.3.6" />
16-
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.1.1.8" />
17-
<PackageReference Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1" />
14+
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.1" />
15+
<PackageReference Include="Xamarin.AndroidX.Fragment" Version="1.3.6.1" />
16+
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.1.1.9" />
17+
<PackageReference Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.1" />
1818
<Reference Include="System.Runtime.Serialization" />
1919
</ItemGroup>
2020

src/ReactiveUI.Blazor/ReactiveUI.Blazor.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="MSBuild.Sdk.Extras">
1+
<Project Sdk="MSBuild.Sdk.Extras">
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
44
<PackageDescription>Contains the ReactiveUI platform specific extensions for Blazor</PackageDescription>
@@ -12,11 +12,11 @@
1212
</ItemGroup>
1313

1414
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
15-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.12" />
15+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.17" />
1616
</ItemGroup>
1717

1818
<ItemGroup Condition=" $(TargetFramework.StartsWith('net5')) ">
19-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.5" />
19+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="5.0.8" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

src/ReactiveUI.Tests/Commands/ReactiveCommandTest.cs

Lines changed: 60 additions & 53 deletions
Large diffs are not rendered by default.

src/ReactiveUI.Tests/Platforms/wpf/Mocks/CommandBindingViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public class CommandBindingViewModel : ReactiveObject
2222

2323
public CommandBindingViewModel()
2424
{
25-
_Command1 = ReactiveCommand.Create<int, int>(_ => { return _; }, outputScheduler: ImmediateScheduler.Instance);
26-
_Command2 = ReactiveCommand.Create(() => { }, outputScheduler: ImmediateScheduler.Instance);
27-
_Command3 = ReactiveCommand.CreateFromTask(RunAsync, outputScheduler: RxApp.TaskpoolScheduler);
25+
_Command1 = ReactiveCommand.Create<int, int>(_ => { return _; }, outputScheduler: ImmediateScheduler.Instance, canExecuteScheduler: ImmediateScheduler.Instance);
26+
_Command2 = ReactiveCommand.Create(() => { }, outputScheduler: ImmediateScheduler.Instance, canExecuteScheduler: ImmediateScheduler.Instance);
27+
_Command3 = ReactiveCommand.CreateFromTask(RunAsync, outputScheduler: RxApp.TaskpoolScheduler, canExecuteScheduler: ImmediateScheduler.Instance);
2828
_result = _Command3.ToProperty(this, x => x.Result, scheduler: RxApp.MainThreadScheduler);
2929
}
3030

src/ReactiveUI.XamForms.Tests/Activation/Mocks/App.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public partial class App
1616
/// <summary>
1717
/// Initializes a new instance of the <see cref="App" /> class.
1818
/// </summary>
19-
/// <param name="page">The page.</param>
2019
public App()
2120
{
2221
InitializeComponent();

src/ReactiveUI/Platforms/apple-common/ReactiveImageView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected ReactiveImageView(IntPtr handle)
108108
public IObservable<Exception> ThrownExceptions => this.GetThrownExceptionsObservable();
109109

110110
/// <inheritdoc/>
111-
public IObservable<Unit> Activated => _activated.AsObservable();
111+
public new IObservable<Unit> Activated => _activated.AsObservable();
112112

113113
/// <inheritdoc/>
114114
public IObservable<Unit> Deactivated => _deactivated.AsObservable();

src/ReactiveUI/ReactiveCommand/ReactiveCommandBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace ReactiveUI
3131
/// To create an instance of <c>ReactiveCommand</c>, call one of the static creation methods defined by this class.
3232
/// <see cref="ReactiveCommand.Create"/> can be used when your execution logic is synchronous.
3333
/// <see cref="ReactiveCommand.CreateFromObservable{TResult}(Func{IObservable{TResult}}, IObservable{bool}, IScheduler, IScheduler)"/> and
34-
/// <see cref="ReactiveCommand.CreateFromTask(Func{Task}, IObservable{bool}, IScheduler)"/> (and overloads) can be used for asynchronous
34+
/// <see cref="ReactiveCommand.CreateFromTask(Func{Task}, IObservable{bool}, IScheduler, IScheduler)"/> (and overloads) can be used for asynchronous
3535
/// execution logic. Optionally, you can provide an observable that governs the availability of the command for execution,
3636
/// as well as a scheduler to which events will be delivered.
3737
/// </para>

0 commit comments

Comments
 (0)