Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

ReadOnlyReactiveProperty does not call OnCompleted in some cases #536

Open
ymfact opened this issue Nov 28, 2023 · 0 comments
Open

ReadOnlyReactiveProperty does not call OnCompleted in some cases #536

ymfact opened this issue Nov 28, 2023 · 0 comments

Comments

@ymfact
Copy link

ymfact commented Nov 28, 2023

When OnCompleted is called on a Subject,
the associated ReadOnlyReactiveProperty's OnCompleted should also be invoked,
but it is not happening as expected.

var subject = new Subject<Unit>();
var readOnlyReactiveProperty = subject.ToReadOnlyReactiveProperty();
readOnlyReactiveProperty.Subscribe(
    onNext: _ => Console.WriteLine("OnNext"),
    onCompleted: () => Console.WriteLine("OnCompleted"));
subject.OnCompleted();

Nothing is printed to the console with this code, whereas 'OnCompleted' should be outputted.

@ymfact ymfact changed the title ReadOnlyReactiveProperty has a bug about OnCompleted ReadOnlyReactiveProperty does not call OnCompleted in some cases Nov 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant