From f89fa8359b374ee8d637523716a7b62e0133b1fb Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 16 Aug 2018 16:09:00 -0400 Subject: [PATCH] Revert "Add logging around 'SAE to same thread' crash." This reverts commit eee2f7c8c6098adddb35f63e0b231322dec8f842. --- .../ConversationViewController.m | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index f0d3f8bb7..18e387b51 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -3226,8 +3226,7 @@ typedef enum : NSUInteger { { OWSAssertIsOnMainThread(); - // DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); - DDLogInfo(@"%@ uiDatabaseDidUpdateExternally: %zd", self.logTag, self.viewItems.count); + DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); if (self.shouldObserveDBModifications) { // External database modifications can't be converted into incremental updates, @@ -3242,8 +3241,6 @@ typedef enum : NSUInteger { - (void)uiDatabaseWillUpdate:(NSNotification *)notification { - DDLogInfo(@"%@ uiDatabaseWillUpdate: %zd", self.logTag, self.viewItems.count); - // HACK to work around radar #28167779 // "UICollectionView performBatchUpdates can trigger a crash if the collection view is flagged for layout" // more: https://github.com/PSPDFKit-labs/radar.apple.com/tree/master/28167779%20-%20CollectionViewBatchingIssue @@ -3261,13 +3258,10 @@ typedef enum : NSUInteger { OWSAssertIsOnMainThread(); if (!self.shouldObserveDBModifications) { - DDLogInfo(@"%@ uiDatabaseDidUpdate (ignoring): %zd", self.logTag, self.viewItems.count); - return; } - - DDLogInfo(@"%@ uiDatabaseDidUpdate (ignoring): %zd", self.logTag, self.viewItems.count); - // DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + + DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); NSArray *notifications = notification.userInfo[OWSUIDatabaseConnectionNotificationsKey]; OWSAssert([notifications isKindOfClass:[NSArray class]]); @@ -3400,8 +3394,7 @@ typedef enum : NSUInteger { for (YapDatabaseViewRowChange *rowChange in rowChanges) { switch (rowChange.type) { case YapDatabaseViewChangeDelete: { - DDLogInfo(@"%@ YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", rowChange.collectionKey, rowChange.indexPath, (unsigned long)rowChange.finalIndex); @@ -3411,8 +3404,7 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeInsert: { - DDLogInfo(@"%@ YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", rowChange.collectionKey, rowChange.newIndexPath, (unsigned long)rowChange.finalIndex); @@ -3429,9 +3421,8 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeMove: { - DDLogInfo(@"%@ YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " - @"finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " + @"finalIndex: %lu", rowChange.collectionKey, rowChange.indexPath, rowChange.newIndexPath, @@ -3440,8 +3431,7 @@ typedef enum : NSUInteger { break; } case YapDatabaseViewChangeUpdate: { - DDLogInfo(@"%@ YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", - self.logTag, + DDLogVerbose(@"YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", rowChange.collectionKey, rowChange.indexPath, (unsigned long)rowChange.finalIndex); @@ -3452,7 +3442,7 @@ typedef enum : NSUInteger { } }; - DDLogInfo(@"%@ self.viewItems.count: %zd -> %zd", self.logTag, oldViewItemCount, self.viewItems.count); + DDLogVerbose(@"self.viewItems.count: %zd -> %zd", oldViewItemCount, self.viewItems.count); BOOL shouldAnimateUpdates = [self shouldAnimateRowUpdates:rowChanges oldViewItemCount:oldViewItemCount]; void (^batchUpdatesCompletion)(BOOL) = ^(BOOL finished) { @@ -5202,8 +5192,6 @@ typedef enum : NSUInteger { - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - DDLogInfo(@"%@ collectionView:numberOfItemsInSection: %zd", self.logTag, self.viewItems.count); - return (NSInteger)self.viewItems.count; }