mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 08:26:23 +00:00
Summary: After the RCTBatchedBridge refactor, the `-[NSNotificationCenter addObserver]` and `[removeObserver]` calls got divided between RCTBridge and RCTBatchedBridge. This diff does two things: - Moved `removeObserver` out of RTCBatchedBridge and into `-[RCTBridge invalidate]` - Moved `addObserver` from `bindKeys` to `setUp`. This is so that `-[RCTBridge reload]` will re-add the observer after invalidating and removing the observer cc @tadeuzagallo Closes https://github.com/facebook/react-native/pull/1212 Github Author: James Ide <ide@jameside.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.