Minor refactoring
This commit is contained in:
parent
7243dcb48d
commit
0b29def940
|
@ -425,7 +425,7 @@ typedef enum : NSUInteger {
|
|||
name:NSNotification.threadSessionRestoreDevicesChanged
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleGroupThreadUpdated:)
|
||||
selector:@selector(handleGroupThreadUpdatedNotification:)
|
||||
name:NSNotification.groupThreadUpdated
|
||||
object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
|
@ -511,7 +511,7 @@ typedef enum : NSUInteger {
|
|||
[self ensureBannerState];
|
||||
}
|
||||
|
||||
- (void)handleGroupThreadUpdated:(NSNotification *)notification
|
||||
- (void)handleGroupThreadUpdatedNotification:(NSNotification *)notification
|
||||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
|
||||
|
|
|
@ -237,8 +237,7 @@ NSString *const TSGroupThread_NotificationKey_UniqueId = @"TSGroupThread_Notific
|
|||
self.groupModel = newGroupModel;
|
||||
[self saveWithTransaction:transaction];
|
||||
|
||||
[transaction addCompletionQueue:dispatch_get_main_queue()
|
||||
completionBlock:^{
|
||||
[transaction addCompletionQueue:dispatch_get_main_queue() completionBlock:^{
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:NSNotification.groupThreadUpdated object:self.uniqueId];
|
||||
}];
|
||||
}
|
||||
|
@ -261,8 +260,7 @@ NSString *const TSGroupThread_NotificationKey_UniqueId = @"TSGroupThread_Notific
|
|||
self.groupModel.groupMemberIds = newGroupMemberIDs.allObjects;
|
||||
[self saveWithTransaction:transaction];
|
||||
|
||||
[transaction addCompletionQueue:dispatch_get_main_queue()
|
||||
completionBlock:^{
|
||||
[transaction addCompletionQueue:dispatch_get_main_queue() completionBlock:^{
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:NSNotification.groupThreadUpdated object:self.uniqueId];
|
||||
}];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ public extension Notification.Name {
|
|||
// State changes
|
||||
public static let contactOnlineStatusChanged = Notification.Name("contactOnlineStatusChanged")
|
||||
public static let threadFriendRequestStatusChanged = Notification.Name("threadFriendRequestStatusChanged")
|
||||
public static let groupThreadUpdated = Notification.Name("groupThreadLeft")
|
||||
public static let groupThreadUpdated = Notification.Name("groupThreadUpdated")
|
||||
public static let messageFriendRequestStatusChanged = Notification.Name("messageFriendRequestStatusChanged")
|
||||
public static let threadDeleted = Notification.Name("threadDeleted")
|
||||
public static let threadSessionRestoreDevicesChanged = Notification.Name("threadSessionRestoreDevicesChanged")
|
||||
|
|
Loading…
Reference in New Issue