fixup cache

pull/1/head
Michael Kirk 7 years ago
parent 9c81eb44a1
commit 113cb254d9

@ -156,14 +156,14 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
_blockedPhoneNumberSet = [NSSet setWithArray:[_blockingManager blockedPhoneNumbers]]; _blockedPhoneNumberSet = [NSSet setWithArray:[_blockingManager blockedPhoneNumbers]];
[self.tableView reloadData]; [self reloadTableViewData];
} }
- (void)signalAccountsDidChange:(id)notification - (void)signalAccountsDidChange:(id)notification
{ {
OWSAssertIsOnMainThread(); OWSAssertIsOnMainThread();
[self.tableView reloadData]; [self reloadTableViewData];
} }
#pragma mark - View Life Cycle #pragma mark - View Life Cycle
@ -473,6 +473,13 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
} }
} }
- (void)reloadTableViewData
{
// PERF: come up with a more nuanced cache clearing scheme
[self.threadModelCache removeAllObjects];
[self.tableView reloadData];
}
- (void)resetMappings - (void)resetMappings
{ {
// If we're entering "active" mode (e.g. view is visible and app is in foreground), // If we're entering "active" mode (e.g. view is visible and app is in foreground),
@ -489,7 +496,8 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
}]; }];
} }
[[self tableView] reloadData]; [self reloadTableViewData];
[self checkIfEmptyView]; [self checkIfEmptyView];
[self updateInboxCountLabel]; [self updateInboxCountLabel];
@ -926,7 +934,7 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState };
[self resetMappings]; [self resetMappings];
[[self tableView] reloadData]; [self reloadTableViewData];
[self checkIfEmptyView]; [self checkIfEmptyView];
[self updateReminderViews]; [self updateReminderViews];
} }

Loading…
Cancel
Save