Fix to enable use of DynamicData 9.0 (#3875)

<!-- Please be sure to read the
[Contribute](https://github.com/reactiveui/reactiveui#contribute)
section of the README -->

**What kind of change does this PR introduce?**
<!-- Bug fix, feature, docs update, ... -->

fix

**What is the current behavior?**
<!-- You can also link to an open issue here. -->

ReactiveUI 20.1.1 includes DynamicData 8
DynamicData 9 has an update to the Observable Change Set which
introduces a default value, this results in a mismatch in count between
V8 and V9

**What is the new behavior?**
<!-- If this is a feature change -->

the default value has been removed from the RoutingState
CurrentViewModel

**What might this PR break?**

Execution should match previous versions

**Please check if the PR fulfills these requirements**
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

**Other information**:
This commit is contained in:
Chris Pulman 2024-08-12 05:34:05 +08:00 коммит произвёл GitHub
Родитель 16cd48a941
Коммит c8b03969f0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="DynamicData" Version="8.4.1" />
<PackageVersion Include="DynamicData" Version="9.0.1" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="JetBrains.DotMemoryUnit" Version="3.2.20220510" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />

Просмотреть файл

@ -125,6 +125,6 @@ public class RoutingState : ReactiveObject
return Navigate.Execute(vm);
});
CurrentViewModel = Observable.Defer(() => Observable.Return(NavigationStack.LastOrDefault()!)).Concat(NavigationChanged.Select(_ => NavigationStack.LastOrDefault()!));
CurrentViewModel = NavigationChanged.Select(_ => NavigationStack.LastOrDefault()!);
}
}