Skip to content

Commit 943c35a

Browse files
committed
make sure the collections track themselves the same way if accessed as their read-only variants (see #34)
1 parent b17b6a7 commit 943c35a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/TinkState/Runtime/Internal/ObservableDictionary_ObservableOfReadOnlyDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ partial class ObservableDictionary<TKey, TValue> : Observable<IReadOnlyDictionar
77
{
88
IReadOnlyDictionary<TKey, TValue> Observable<IReadOnlyDictionary<TKey, TValue>>.Value
99
{
10-
get => AutoObservable.Track<IReadOnlyDictionary<TKey, TValue>>(this);
10+
get => AutoObservable.Track<ObservableDictionary<TKey, TValue>>(this).entries;
1111
}
1212

1313
IDisposable Observable<IReadOnlyDictionary<TKey, TValue>>.Bind(Action<IReadOnlyDictionary<TKey, TValue>> callback, IEqualityComparer<IReadOnlyDictionary<TKey, TValue>> comparer, Scheduler scheduler)

src/TinkState/Runtime/Internal/ObservableList_ObservableOfReadOnlyList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ partial class ObservableList<T> : Observable<IReadOnlyList<T>>, DispatchingObser
77
{
88
IReadOnlyList<T> Observable<IReadOnlyList<T>>.Value
99
{
10-
get => AutoObservable.Track<IReadOnlyList<T>>(this);
10+
get => AutoObservable.Track<ObservableList<T>>(this).entries;
1111
}
1212

1313
IDisposable Observable<IReadOnlyList<T>>.Bind(Action<IReadOnlyList<T>> callback, IEqualityComparer<IReadOnlyList<T>> comparer, Scheduler scheduler)

0 commit comments

Comments
 (0)