pull/541/head
Ryan Zhao 3 years ago
parent c85e3ef86b
commit 66567ba9f5

@ -120,7 +120,7 @@ static const int kYapDatabaseRangeMaxLength = 250000;
focusMessageIdOnOpen:(nullable NSString *)focusMessageIdOnOpen focusMessageIdOnOpen:(nullable NSString *)focusMessageIdOnOpen
delegate:(id<ConversationViewModelDelegate>)delegate NS_DESIGNATED_INITIALIZER; delegate:(id<ConversationViewModelDelegate>)delegate NS_DESIGNATED_INITIALIZER;
- (void)ensureDynamicInteractionsAndUpdateIfNecessary:(BOOL)updateIfNecessary; - (void)ensureDynamicInteractionsAndUpdateIfNecessary;
- (void)loadAnotherPageOfMessages; - (void)loadAnotherPageOfMessages;

@ -295,13 +295,6 @@ NS_ASSUME_NONNULL_BEGIN
object:nil]; object:nil];
} }
- (void)signalAccountsDidChange:(NSNotification *)notification
{
OWSAssertIsOnMainThread();
[self ensureDynamicInteractionsAndUpdateIfNecessary:YES];
}
- (void)profileWhitelistDidChange:(NSNotification *)notification - (void)profileWhitelistDidChange:(NSNotification *)notification
{ {
OWSAssertIsOnMainThread(); OWSAssertIsOnMainThread();
@ -334,7 +327,7 @@ NS_ASSUME_NONNULL_BEGIN
self.typingIndicatorsSender = [self.typingIndicators typingRecipientIdForThread:self.thread]; self.typingIndicatorsSender = [self.typingIndicators typingRecipientIdForThread:self.thread];
self.collapseCutoffDate = [NSDate new]; self.collapseCutoffDate = [NSDate new];
[self ensureDynamicInteractionsAndUpdateIfNecessary:NO]; [self ensureDynamicInteractionsAndUpdateIfNecessary];
[self.primaryStorage updateUIDatabaseConnectionToLatest]; [self.primaryStorage updateUIDatabaseConnectionToLatest];
[self createNewMessageMapping]; [self createNewMessageMapping];
@ -490,7 +483,7 @@ NS_ASSUME_NONNULL_BEGIN
self.collapseCutoffDate = [NSDate new]; self.collapseCutoffDate = [NSDate new];
} }
- (void)ensureDynamicInteractionsAndUpdateIfNecessary:(BOOL)updateIfNecessary - (void)ensureDynamicInteractionsAndUpdateIfNecessary
{ {
OWSAssertIsOnMainThread(); OWSAssertIsOnMainThread();
@ -508,7 +501,7 @@ NS_ASSUME_NONNULL_BEGIN
BOOL didChange = ![NSObject isNullableObject:self.dynamicInteractions equalTo:dynamicInteractions]; BOOL didChange = ![NSObject isNullableObject:self.dynamicInteractions equalTo:dynamicInteractions];
self.dynamicInteractions = dynamicInteractions; self.dynamicInteractions = dynamicInteractions;
if (didChange && updateIfNecessary) { if (didChange) {
if (![self reloadViewItems]) { if (![self reloadViewItems]) {
OWSFailDebug(@"Failed to reload view items."); OWSFailDebug(@"Failed to reload view items.");
} }
@ -953,7 +946,7 @@ NS_ASSUME_NONNULL_BEGIN
self.collapseCutoffDate = [NSDate new]; self.collapseCutoffDate = [NSDate new];
[self ensureDynamicInteractionsAndUpdateIfNecessary:NO]; [self ensureDynamicInteractionsAndUpdateIfNecessary];
if (![self reloadViewItems]) { if (![self reloadViewItems]) {
OWSFailDebug(@"failed to reload view items in resetMapping."); OWSFailDebug(@"failed to reload view items in resetMapping.");
@ -1392,7 +1385,7 @@ NS_ASSUME_NONNULL_BEGIN
self.collapseCutoffDate = [NSDate new]; self.collapseCutoffDate = [NSDate new];
[self ensureDynamicInteractionsAndUpdateIfNecessary:NO]; [self ensureDynamicInteractionsAndUpdateIfNecessary];
if (![self reloadViewItems]) { if (![self reloadViewItems]) {
OWSFailDebug(@"failed to reload view items in resetMapping."); OWSFailDebug(@"failed to reload view items in resetMapping.");
@ -1416,7 +1409,7 @@ NS_ASSUME_NONNULL_BEGIN
self.collapseCutoffDate = [NSDate new]; self.collapseCutoffDate = [NSDate new];
[self ensureDynamicInteractionsAndUpdateIfNecessary:NO]; [self ensureDynamicInteractionsAndUpdateIfNecessary];
if (![self reloadViewItems]) { if (![self reloadViewItems]) {
OWSFailDebug(@"failed to reload view items in resetMapping."); OWSFailDebug(@"failed to reload view items in resetMapping.");

Loading…
Cancel
Save