Merge pull request #2599 from WhisperSystems/charlesmchen/contactChangesVsOffers

Fix wrongful "add to contacts offer" issue, pt. 1.
This commit is contained in:
Michael Kirk 2017-09-29 18:39:30 -04:00 committed by GitHub
commit 3812fe54a8

View file

@ -421,6 +421,10 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
selector:@selector(profileWhitelistDidChange:)
name:kNSNotificationName_ProfileWhitelistDidChange
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(signalAccountsDidChange:)
name:OWSContactsManagerSignalAccountsDidChangeNotification
object:nil];
}
- (void)addVisibleListeners
@ -441,6 +445,13 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardDidShowNotification object:nil];
}
- (void)signalAccountsDidChange:(NSNotification *)notification
{
OWSAssert([NSThread isMainThread]);
[self ensureDynamicInteractions];
}
- (void)keyboardWillShow:(NSNotification *)notification
{
OWSAssert([NSThread isMainThread]);