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

[MVUX] Commands are not sharing the same SourceContext #1622

Closed
5 of 6 tasks
dr1rrb opened this issue Jul 4, 2023 · 0 comments · Fixed by #1695
Closed
5 of 6 tasks

[MVUX] Commands are not sharing the same SourceContext #1622

dr1rrb opened this issue Jul 4, 2023 · 0 comments · Fixed by #1695
Assignees
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.

Comments

@dr1rrb
Copy link
Member

dr1rrb commented Jul 4, 2023

Current behavior

When creating a command, the context used is not the same as the context used by a FeedView on the same page. This drives teh commands to not have the value as what is displayed in the view.

Expected behavior

They share the same SourceContext so they will share the same subscription on the Feed, so they will have the same value.

How to reproduce it (as minimally and precisely as possible)

public Feed<int> MyFeed => Feed.Async(async ct => new Random(DateTime.Now.MilliSeconds).Next());

public void DoSomething(int myFeed, CancellationToken ct)
{
}
<StackPanel>
    <FeedView Source="{Binding MyFeed}" />
    <Button Command="{Binding DoSomething}" />
</StackPanel>

Notice that the value got in the DoSomething is not the same as the one got in the UI.

Environment

Nuget Package: Uno.Extensions.Reactive
Package Version(s): current
Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • Windows
  • Build tasks
@dr1rrb dr1rrb added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification. labels Jul 4, 2023
@dr1rrb dr1rrb self-assigned this Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
1 participant