Add temporary logging around conversation view crashes.

pull/1/head
Matthew Chen 7 years ago
parent 30ce675236
commit db2f5bf3b0

@ -3299,6 +3299,9 @@ typedef enum : NSUInteger {
return; return;
} }
DDLogInfo(@"%@ uiDatabaseDidUpdate notifications: %@", self.logTag, notifications);
NSArray<YapDatabaseViewSectionChange *> *sectionChanges = nil; NSArray<YapDatabaseViewSectionChange *> *sectionChanges = nil;
NSArray<YapDatabaseViewRowChange *> *rowChanges = nil; NSArray<YapDatabaseViewRowChange *> *rowChanges = nil;
[[self.uiDatabaseConnection ext:TSMessageDatabaseViewExtensionName] getSectionChanges:&sectionChanges [[self.uiDatabaseConnection ext:TSMessageDatabaseViewExtensionName] getSectionChanges:&sectionChanges
@ -3397,7 +3400,8 @@ typedef enum : NSUInteger {
for (YapDatabaseViewRowChange *rowChange in rowChanges) { for (YapDatabaseViewRowChange *rowChange in rowChanges) {
switch (rowChange.type) { switch (rowChange.type) {
case YapDatabaseViewChangeDelete: { case YapDatabaseViewChangeDelete: {
DDLogVerbose(@"YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu", DDLogInfo(@"%@ YapDatabaseViewChangeDelete collectionKey: %@, indexPath: %@, finalIndex: %lu",
self.logTag,
rowChange.collectionKey, rowChange.collectionKey,
rowChange.indexPath, rowChange.indexPath,
(unsigned long)rowChange.finalIndex); (unsigned long)rowChange.finalIndex);
@ -3407,7 +3411,8 @@ typedef enum : NSUInteger {
break; break;
} }
case YapDatabaseViewChangeInsert: { case YapDatabaseViewChangeInsert: {
DDLogVerbose(@"YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu", DDLogInfo(@"%@ YapDatabaseViewChangeInsert collectionKey: %@, newIndexPath: %@, finalIndex: %lu",
self.logTag,
rowChange.collectionKey, rowChange.collectionKey,
rowChange.newIndexPath, rowChange.newIndexPath,
(unsigned long)rowChange.finalIndex); (unsigned long)rowChange.finalIndex);
@ -3424,8 +3429,9 @@ typedef enum : NSUInteger {
break; break;
} }
case YapDatabaseViewChangeMove: { case YapDatabaseViewChangeMove: {
DDLogVerbose(@"YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, " DDLogInfo(@"%@ YapDatabaseViewChangeMove collectionKey: %@, indexPath: %@, newIndexPath: %@, "
@"finalIndex: %lu", @"finalIndex: %lu",
self.logTag,
rowChange.collectionKey, rowChange.collectionKey,
rowChange.indexPath, rowChange.indexPath,
rowChange.newIndexPath, rowChange.newIndexPath,
@ -3434,7 +3440,8 @@ typedef enum : NSUInteger {
break; break;
} }
case YapDatabaseViewChangeUpdate: { case YapDatabaseViewChangeUpdate: {
DDLogVerbose(@"YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu", DDLogInfo(@"%@ YapDatabaseViewChangeUpdate collectionKey: %@, indexPath: %@, finalIndex: %lu",
self.logTag,
rowChange.collectionKey, rowChange.collectionKey,
rowChange.indexPath, rowChange.indexPath,
(unsigned long)rowChange.finalIndex); (unsigned long)rowChange.finalIndex);
@ -3445,7 +3452,7 @@ typedef enum : NSUInteger {
} }
}; };
DDLogVerbose(@"self.viewItems.count: %zd -> %zd", oldViewItemCount, self.viewItems.count); DDLogInfo(@"%@ viewItems.count: %zd -> %zd", self.logTag, oldViewItemCount, self.viewItems.count);
BOOL shouldAnimateUpdates = [self shouldAnimateRowUpdates:rowChanges oldViewItemCount:oldViewItemCount]; BOOL shouldAnimateUpdates = [self shouldAnimateRowUpdates:rowChanges oldViewItemCount:oldViewItemCount];
void (^batchUpdatesCompletion)(BOOL) = ^(BOOL finished) { void (^batchUpdatesCompletion)(BOOL) = ^(BOOL finished) {

Loading…
Cancel
Save