Restore pull-to-refresh in the "new contact thread" view.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 28219008b7
commit 3aa90451f1

@ -113,9 +113,25 @@ NS_ASSUME_NONNULL_BEGIN
[self.noSignalContactsView autoPinEdgeToSuperviewEdge:ALEdgeTop];
[self.noSignalContactsView autoPinToBottomLayoutGuideOfViewController:self withInset:0];
UIRefreshControl *pullToRefreshView = [UIRefreshControl new];
pullToRefreshView.tintColor = [UIColor grayColor];
[pullToRefreshView addTarget:self
action:@selector(pullToRefreshPerformed:)
forControlEvents:UIControlEventValueChanged];
[self.tableViewController.tableView insertSubview:pullToRefreshView atIndex:0];
[self updateTableContents];
}
- (void)pullToRefreshPerformed:(UIRefreshControl *)refreshControl
{
OWSAssert([NSThread isMainThread]);
[self.contactsViewHelper.contactsManager requestSystemContactsOnce];
[refreshControl endRefreshing];
}
- (void)showContactsPermissionReminder:(BOOL)isVisible
{
_hideContactsPermissionReminderViewConstraint.active = !isVisible;
@ -789,6 +805,18 @@ NS_ASSUME_NONNULL_BEGIN
}
}
#pragma mark - Logging
+ (NSString *)tag
{
return [NSString stringWithFormat:@"[%@]", self.class];
}
- (NSString *)tag
{
return self.class.tag;
}
@end
NS_ASSUME_NONNULL_END

Loading…
Cancel
Save