diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props index 9da485ef..30f5f532 100644 --- a/Source/Directory.Build.props +++ b/Source/Directory.Build.props @@ -1,7 +1,7 @@ Reactive.Bindings - 9.3.1 + 9.3.2 neuecc xin9le okazuki https://github.com/runceel/ReactiveProperty rx mvvm async rx-main reactive diff --git a/Source/ReactiveProperty.NETStandard/Helpers/FilteredReadOnlyObservableCollection.cs b/Source/ReactiveProperty.NETStandard/Helpers/FilteredReadOnlyObservableCollection.cs index c068bf39..06a54a23 100644 --- a/Source/ReactiveProperty.NETStandard/Helpers/FilteredReadOnlyObservableCollection.cs +++ b/Source/ReactiveProperty.NETStandard/Helpers/FilteredReadOnlyObservableCollection.cs @@ -351,7 +351,16 @@ public void Dispose() CollectionChanged -= Source_CollectionChanged; } - private int FindNearIndex(int position) => IndexList.Take(position).Reverse().FirstOrDefault(x => x != null) ?? -1; + private int FindNearIndex(int position) + { + for (int i = position; i >= 0; i--) + { + var value = IndexList[i]; + if (value != null) return value.Value; + } + + return -1; + } private void AppearNewItem(int index) {