From 5b0d806a6dee051a3f2fb2713873d7dccc114823 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 29 May 2018 13:42:49 -0400 Subject: [PATCH] Add temporary verbose logging around message creation. --- .../ConversationViewController.m | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 5c286a8c4..ec2ad11d7 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -4633,6 +4633,13 @@ typedef enum : NSUInteger { - (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), // reset all state updated by yapDatabaseModified:. if (self.messageMappings != nil) { @@ -4662,6 +4669,17 @@ typedef enum : NSUInteger { [self.editingDatabaseConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [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