Update conversation view title when group name changes.
// FREEBIE
This commit is contained in:
parent
ec06cf76e4
commit
081956c2b4
|
@ -15,7 +15,7 @@ typedef enum : NSUInteger {
|
|||
kCallMissed = 3,
|
||||
kCallOutgoingIncomplete = 4,
|
||||
kCallIncomingIncomplete = 5,
|
||||
kGroupUpdateJoin = 6,
|
||||
// kGroupUpdateJoin has been deprecated.
|
||||
kGroupUpdateLeft = 7,
|
||||
kGroupUpdate = 8,
|
||||
} CallStatus;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue