From 38c024d1b31bbfb8ce667a5071c57a3bf19271c0 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Mon, 31 Jan 2022 16:04:28 -0800 Subject: [PATCH] Only update group member records when the group model changes --- SignalServiceKit/src/Contacts/Threads/TSGroupThread.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m b/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m index 4a1ce828b2..ad32e35fa3 100644 --- a/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m +++ b/SignalServiceKit/src/Contacts/Threads/TSGroupThread.m @@ -168,6 +168,7 @@ lastVisibleSortIdOnScreenPercentageObsolete:lastVisibleSortIdOnScreenPercentageO thread.groupModel = [newGroupModel copy]; }]; + [self updateGroupMemberRecordsWithTransaction:transaction]; [SDSDatabaseStorage.shared touchThread:self shouldReindex:true transaction:transaction]; if (didAvatarChange) { @@ -210,7 +211,8 @@ lastVisibleSortIdOnScreenPercentageObsolete:lastVisibleSortIdOnScreenPercentageO [super anyWillUpdateWithTransaction:transaction]; [self protectV2Migration:transaction]; - [self updateGroupMemberRecordsWithTransaction:transaction]; + // We used to update the group member records here, but there are many updates that don't touch membership. + // Now it's done explicitly where we update the group model, and not for other updates. } - (void)protectV2Migration:(SDSAnyWriteTransaction *)transaction