From f6f08891ebc2931ae2459ea140d8fa1dfebb7eaf Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 19 Jun 2017 14:05:59 -0400 Subject: [PATCH] Avoid stale mapping in conversation view. // FREEBIE --- .../ViewControllers/ConversationView/MessagesViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m index 26fdd6372..d9c226404 100644 --- a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m +++ b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m @@ -2698,6 +2698,8 @@ typedef enum : NSUInteger { const int currentMaxRangeSize = (int)(self.page + 1) * kYapDatabasePageSize; const int maxRangeSize = MAX(initialMaxRangeSize, currentMaxRangeSize); + // `ensureDynamicInteractionsForThread` should operate on the latest thread contents, so + // we should _read_ from uiDatabaseConnection and _write_ to `editingDatabaseConnection`. self.dynamicInteractions = [ThreadUtil ensureDynamicInteractionsForThread:self.thread contactsManager:self.contactsManager