Don’t update contacts in the blacklist views.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 6c1d46c4d7
commit 8dadc3ba22

@ -4,7 +4,6 @@
#import "AddToBlockListViewController.h"
#import "ContactTableViewCell.h"
#import "ContactsUpdater.h"
#import "CountryCodeViewController.h"
#import "Environment.h"
#import "OWSContactsManager.h"
@ -77,13 +76,6 @@ NSString *const kContactsTable_CellReuseIdentifier = @"kContactsTable_CellReuseI
[self.navigationController.navigationBar setTranslucent:NO];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self refreshContacts];
}
- (void)addNotificationListeners
{
[[NSNotificationCenter defaultCenter] addObserver:self
@ -483,17 +475,6 @@ NSString *const kContactsTable_CellReuseIdentifier = @"kContactsTable_CellReuseI
[self presentViewController:controller animated:YES completion:nil];
}
- (void)refreshContacts
{
[[ContactsUpdater sharedUpdater] updateSignalContactIntersectionWithABContacts:self.contactsManager.allContacts
success:^{
[self updateContacts];
}
failure:^(NSError *error) {
DDLogError(@"%@ Error updating contacts", self.tag);
}];
}
#pragma mark - UIScrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView

@ -4,7 +4,6 @@
#import "BlockListViewController.h"
#import "AddToBlockListViewController.h"
#import "ContactsUpdater.h"
#import "Environment.h"
#import "OWSContactsManager.h"
#import "PhoneNumber.h"
@ -54,13 +53,6 @@ typedef NS_ENUM(NSInteger, BlockListViewControllerSection) {
[self addNotificationListeners];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self refreshContacts];
}
- (void)addNotificationListeners
{
[[NSNotificationCenter defaultCenter] addObserver:self
@ -256,17 +248,6 @@ typedef NS_ENUM(NSInteger, BlockListViewControllerSection) {
});
}
- (void)refreshContacts
{
[[ContactsUpdater sharedUpdater] updateSignalContactIntersectionWithABContacts:self.contactsManager.allContacts
success:^{
[self updateContacts];
}
failure:^(NSError *error) {
DDLogError(@"%@ Error updating contacts", self.tag);
}];
}
- (void)setContacts:(NSArray<Contact *> *)contacts
{
_contacts = contacts;

Loading…
Cancel
Save