You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -111,17 +111,18 @@ public extension ObservableType where Element: NotificationEmitter {
111
111
112
112
- parameter from: A Realm collection of type `Element`: either `Results`, `List`, `LinkingObjects` or `AnyRealmCollection`.
113
113
- parameter synchronousStart: whether the resulting `Observable` should emit its first element synchronously (e.g. better for UI bindings)
114
+
- parameter queue: The serial dispatch queue to receive notification on. If `nil`, notifications are delivered to the current thread.
114
115
115
116
- returns: `Observable<Element>`, e.g. when called on `Results<Model>` it will return `Observable<Results<Model>>`, on a `List<User>` it will return `Observable<List<User>>`, etc.
staticfunc collection(from collection:Element, synchronousStart:Bool=true, on queue:DispatchQueue?=nil)
118
119
->Observable<Element>{
119
120
returnObservable.create{ observer in
120
121
if synchronousStart {
121
122
observer.onNext(collection)
122
123
}
123
124
124
-
lettoken= collection.observe{ changeset in
125
+
lettoken= collection.observe(on: queue){ changeset in
125
126
126
127
letvalue:Element
127
128
@@ -158,12 +159,13 @@ public extension ObservableType where Element: NotificationEmitter {
158
159
159
160
- parameter from: A Realm collection of type `Element`: either `Results`, `List`, `LinkingObjects` or `AnyRealmCollection`.
160
161
- parameter synchronousStart: whether the resulting Observable should emit its first element synchronously (e.g. better for UI bindings)
162
+
- parameter queue: The serial dispatch queue to receive notification on. If `nil`, notifications are delivered to the current thread.
161
163
162
164
- returns: `Observable<Array<Element.Element>>`, e.g. when called on `Results<Model>` it will return `Observable<Array<Model>>`, on a `List<User>` it will return `Observable<Array<User>>`, etc.
0 commit comments