From 72edf869a075b2d7f68dc2e82af3610de575bf40 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Sun, 17 Apr 2016 17:02:30 +0200 Subject: [PATCH] Removes `distinctUntilChanged` because is was creating a hidden state that can cause issues in some situations. --- RxCocoa/Common/Observables/Implementations/KVOObservable.swift | 1 - RxCocoa/iOS/UIControl+Rx.swift | 1 - RxCocoa/iOS/UITextView+Rx.swift | 1 - 3 files changed, 3 deletions(-) diff --git a/RxCocoa/Common/Observables/Implementations/KVOObservable.swift b/RxCocoa/Common/Observables/Implementations/KVOObservable.swift index 08cfeeab..9c031261 100644 --- a/RxCocoa/Common/Observables/Implementations/KVOObservable.swift +++ b/RxCocoa/Common/Observables/Implementations/KVOObservable.swift @@ -55,7 +55,6 @@ func observeWeaklyKeyPathFor(target: NSObject, keyPath: String, options: NSKeyVa let components = keyPath.componentsSeparatedByString(".").filter { $0 != "self" } let observable = observeWeaklyKeyPathFor(target, keyPathSections: components, options: options) - .distinctUntilChanged { $0 === $1 } .finishWithNilWhenDealloc(target) if !options.intersect(.Initial).isEmpty { diff --git a/RxCocoa/iOS/UIControl+Rx.swift b/RxCocoa/iOS/UIControl+Rx.swift index d8409dbc..e7d93794 100644 --- a/RxCocoa/iOS/UIControl+Rx.swift +++ b/RxCocoa/iOS/UIControl+Rx.swift @@ -84,7 +84,6 @@ extension UIControl { controlTarget.dispose() } } - .distinctUntilChanged() .takeUntil((control as! NSObject).rx_deallocated) let bindingObserver = UIBindingObserver(UIElement: control, binding: setter) diff --git a/RxCocoa/iOS/UITextView+Rx.swift b/RxCocoa/iOS/UITextView+Rx.swift index 06389f3a..faebc494 100644 --- a/RxCocoa/iOS/UITextView+Rx.swift +++ b/RxCocoa/iOS/UITextView+Rx.swift @@ -50,7 +50,6 @@ extension UITextView { return textChanged .startWith(text) - .distinctUntilChanged() } let bindingObserver = UIBindingObserver(UIElement: self) { (textView, text: String) in