Skip to content

[Feature]: FilterOnObservable passes to downstream anyways then it gets back to check?! #1039

Description

@bakhtvar

Describe the functionality desired 🐞

.FilterOnObservable(item => item.WhenAnyValue(x => x.AlwaysFalse))
.Transform(x => {
Log.Warning("Shall never be called!");
return x;
})

While it is expected the log never happens, but the log is happening once!
I have asked some AI, they said that this is by design, but it is totally wired from my point of view.

The steps the functionality will provide

I guess, with the above design ultimately FilterOnObservable becomes useless,,,, and I have used the following workaround everywhere..

.AutoRefreshOnObservable(item => item.WhenAnyValue(x => x.AlwaysFalse).Skip(1))
.Filter(x => x.AlwaysFalse)
.Transform(x => {
Log.Warning("Shall never be called!");
return x;
})

this correctly never goes to log, but I had two lines of code instead of one.

Considerations

Above I provided the workaround.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions