From 4c3de8de504384802f3eef99089411536d3426a2 Mon Sep 17 00:00:00 2001 From: Shai Mishali Date: Tue, 27 Dec 2016 21:20:35 +0200 Subject: [PATCH 1/2] Allow usage of rx.disposeBag alongside rx_disposeBag It seems to me having disposeBag scoped into the `rx.` prefix feel more in-line with the rest of the library's behavior, so felt this would be a nice touch-up. Of course totally open to any feedback. This allows `.addDisposableTo(rx.disposeBag)` --- NSObject+Rx.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NSObject+Rx.swift b/NSObject+Rx.swift index 7602d68..e6a5af6 100644 --- a/NSObject+Rx.swift +++ b/NSObject+Rx.swift @@ -35,3 +35,9 @@ public extension NSObject { } } } + +extension Reactive where Base: NSObject { + var disposeBag: DisposeBag { + return base.rx_disposeBag + } +} From dd3ce4b23729f4583740cf0639b1177b7867afa8 Mon Sep 17 00:00:00 2001 From: Shai Mishali Date: Sat, 31 Dec 2016 15:43:58 +0200 Subject: [PATCH 2/2] Updated Changelog for PR #29 Updated Changelog.md for PR #29 - Allow usage of rx.disposeBag alongside rx_disposeBag --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index b023ff6..626b3f0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,7 +4,7 @@ Changelog Current master -------------- -- Nothing yet! +- Allow usage of rx.disposeBag alongside rx_disposeBag ([#29](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/29)) - [@freak4pc](https://github.com/freak4pc) 2.0.0 -----