Add temporary verbose logging around message creation.

pull/1/head
Matthew Chen 7 years ago
parent e8bb55a514
commit 5b0d806a6d

@ -4633,6 +4633,13 @@ typedef enum : NSUInteger {
- (void)resetMappings - (void)resetMappings
{ {
DDLogInfo(@"%@ %s", self.logTag, __PRETTY_FUNCTION__);
[DDLog flushLog];
[self.editingDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[transaction setObject:[NSUUID UUID].UUIDString forKey:@"conversation_view_noop_mod" inCollection:@"temp"];
}];
// 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),
// reset all state updated by yapDatabaseModified:. // reset all state updated by yapDatabaseModified:.
if (self.messageMappings != nil) { if (self.messageMappings != nil) {
@ -4662,6 +4669,17 @@ typedef enum : NSUInteger {
[self.editingDatabaseConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [self.editingDatabaseConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[transaction setObject:[NSUUID UUID].UUIDString forKey:@"conversation_view_noop_mod" inCollection:@"temp"]; [transaction setObject:[NSUUID UUID].UUIDString forKey:@"conversation_view_noop_mod" inCollection:@"temp"];
}]; }];
if (self.viewItems.count > 0) {
ConversationViewItem *lastViewItem = [self.viewItems lastObject];
DDLogInfo(@"%@ --- resetMappings last: %@, %llu, %llu, %llu",
self.logTag,
lastViewItem.interaction.debugDescription,
lastViewItem.interaction.timestamp,
lastViewItem.interaction.timestampForSorting,
[NSDate ows_millisecondTimeStamp]);
[DDLog flushLog];
}
} }
#pragma mark - ConversationCollectionViewDelegate #pragma mark - ConversationCollectionViewDelegate

Loading…
Cancel
Save