-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
[Bug]: TrueForAny emitting prematurely and multiple times #922
Comments
Yeah, this is definitely an implementation flaw. The operator uses emissions from any of the item value streams to trigger a re-evaluation of the whole collection, but begins subscribing to the value streams after the initial collection has been built (with each item's value marked as uninitialized, and thus equate to In the meantime, the following query will get you the same thing, without the premature emission. I'll bet it's actually more efficient, too. var busyObservable = pluginCache.Connect()
.FilterOnObservable(plugin => plugin.IsBusy)
.Count()
.Select(busyCount => busyCount is not 0); |
Thanks @JakenVeina for the prompt reply and fix. When are you all targeting a new release? |
@JakenVeina do you have permission to release? I can't properly check because I am in the Alps trekking right now. |
I'm not sure. I'll take a look, later today. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version 9.0.3 should show up on NuGet shortly, with this fix. |
Describe the bug 🐞
When subscribing to an Observable that evaluates the inner observables for 'TrueForAny', it emits prematurely if the first value is false.
Current
Step to reproduce
Attached below is the code to reproduce the behaviour above
Reproduction repository
See code in issue
Expected behavior
See modified source code below to emit only one value
Expected
Screenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
Windows 10
Version
No response
Device
No response
DynamicData Version
9.0.1
Additional information ℹ️
.net 8
The text was updated successfully, but these errors were encountered: