Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Change NavigationStack as DataMember #3379

Merged
merged 6 commits into from Oct 5, 2022
Merged

Conversation

tomasfil
Copy link
Contributor

@tomasfil tomasfil commented Oct 5, 2022

fixes #3322

@tomasfil
Copy link
Contributor Author

tomasfil commented Oct 5, 2022

I am unsure if this build error is my fault or not

@ChrisPulman
Copy link
Member

I am unsure if this build error is my fault or not

I will try to check it this evening to see what's happening, thank you

@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Base: 63.60% // Head: 63.60% // No change to project coverage 👍

Coverage data is based on head (2e3b600) compared to base (9ac47a1).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3379   +/-   ##
=======================================
  Coverage   63.60%   63.60%           
=======================================
  Files         157      157           
  Lines        5768     5768           
=======================================
  Hits         3669     3669           
  Misses       2099     2099           
Impacted Files Coverage Δ
src/ReactiveUI/Routing/RoutingState.cs 95.34% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ChrisPulman
Copy link
Member

Link to VS2022 Bug

@glennawatson glennawatson changed the title [FIX] Change NavigationStack as DataMember Fix Change NavigationStack as DataMember Oct 5, 2022
@glennawatson glennawatson merged commit fc9a8f3 into main Oct 5, 2022
@glennawatson glennawatson deleted the FixNavigationStackSusp branch October 5, 2022 23:19
@glennawatson
Copy link
Contributor

Sooner they fix that problem so we can remove those ugly workarounds the better.

@ChrisPulman
Copy link
Member

Sooner they fix that problem so we can remove those ugly workarounds the better.

Agree, I will keep an eye on it

@@ -47,7 +47,7 @@ public RoutingState(IScheduler? scheduler = null)
/// Gets the current navigation stack, the last element in the
/// collection being the currently visible ViewModel.
/// </summary>
[IgnoreDataMember]
[DataMember]
public ObservableCollection<IRoutableViewModel> NavigationStack { get; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if just changing [IgnoreDataMember] to [DataMember] fixes the issue #3322. According to L42, the NavigationStack property is only initialized inside the constructor and offers no public setter for a serializer.

NavigationStack = new ObservableCollection<IRoutableViewModel>();
Ideally worth covering this functionality with a unit test.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Router State is No Longer Saved To Disk
4 participants