Describe the functionality desired 🐞
Originally for Cache.Bind() for unsorted streams, an update was achieved by removing the original item and adding the updated item at the end of the list. This behaviour was changed here: #381 to fix this issue #378 .
However, it was a mistake to do this as some platforms do not support replace notifications, and some users have reported issues (including #640). Instead, we should revert to the original default remove / add, and provide an option for a consumer to opt-in to using replace.
This will be addressed by an extra param on the bind methods
// use replace for updates
var collection = new ObservableCollectionExtended<MyType>();
using var binder = source.Connect().Bind(collection, useReplaceForUpdates: true).Subscribe();
// use remove / add for updates
var collection = new ObservableCollectionExtended<MyType>();
using var binder = source.Connect().Bind(collection).Subscribe();
Similarly for ReadOnlyObservableCollection
// use replace for updates
using var binder = source.Connect().Bind(var out myReadonly, useReplaceForUpdates: true).Subscribe();
// use remove / add for updates
using var binder = source.Connect().Bind(var out myReadonly).Subscribe();
The steps the functionality will provide
Described in the description
Considerations
It will break some users, but the reverting to the original is the best solution
Describe the functionality desired 🐞
Originally for Cache.Bind() for unsorted streams, an update was achieved by removing the original item and adding the updated item at the end of the list. This behaviour was changed here: #381 to fix this issue #378 .
However, it was a mistake to do this as some platforms do not support replace notifications, and some users have reported issues (including #640). Instead, we should revert to the original default remove / add, and provide an option for a consumer to opt-in to using replace.
This will be addressed by an extra param on the bind methods
Similarly for
ReadOnlyObservableCollectionThe steps the functionality will provide
Described in the description
Considerations
It will break some users, but the reverting to the original is the best solution