diff --git a/Signal/src/Models/OWSCall.h b/Signal/src/Models/OWSCall.h index 602fde9df..419ae4f5d 100644 --- a/Signal/src/Models/OWSCall.h +++ b/Signal/src/Models/OWSCall.h @@ -15,7 +15,7 @@ typedef enum : NSUInteger { kCallMissed = 3, kCallOutgoingIncomplete = 4, kCallIncomingIncomplete = 5, - kGroupUpdateJoin = 6, + // kGroupUpdateJoin has been deprecated. kGroupUpdateLeft = 7, kGroupUpdate = 8, } CallStatus; diff --git a/Signal/src/Models/TSMessageAdapaters/TSMessageAdapter.m b/Signal/src/Models/TSMessageAdapaters/TSMessageAdapter.m index 2e772bb57..10223111c 100644 --- a/Signal/src/Models/TSMessageAdapaters/TSMessageAdapter.m +++ b/Signal/src/Models/TSMessageAdapaters/TSMessageAdapter.m @@ -180,7 +180,9 @@ if (adapter.infoMessageType == TSInfoMessageTypeGroupQuit || adapter.infoMessageType == TSInfoMessageTypeGroupUpdate) { // repurposing call display for info message stuff for group updates, ! adapter will know because the date - // is nil + // is nil. + // + // TODO: This doesn't seem like a good idea. CallStatus status = 0; if (adapter.infoMessageType == TSInfoMessageTypeGroupQuit) { status = kGroupUpdateLeft; diff --git a/Signal/src/view controllers/MessagesViewController.m b/Signal/src/view controllers/MessagesViewController.m index 063e2029d..47358c4af 100644 --- a/Signal/src/view controllers/MessagesViewController.m +++ b/Signal/src/view controllers/MessagesViewController.m @@ -2079,8 +2079,18 @@ typedef enum : NSUInteger { return _editingDatabaseConnection; } - - (void)yapDatabaseModified:(NSNotification *)notification { + // Currently, we update thread and message state every time + // the database is modified. That doesn't seem optimal, but + // in practice it's efficient enough. + // + // + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateContents]; + }); +} + +- (void)updateContents { [self updateBackButtonAsync]; if (isGroupConversation) { @@ -2091,6 +2101,7 @@ typedef enum : NSUInteger { self.thread = [TSGroupThread threadWithGroupModel:gThread.groupModel transaction:transaction]; } }]; + [self setNavigationTitle]; } NSArray *notifications = [self.uiDatabaseConnection beginLongLivedReadTransaction];