зеркало из https://github.com/nextcloud/talk-ios.git
Stop and remove chat controller even if it was not possible to join the room.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
d1abb7cc7b
Коммит
88b748cc7c
|
@ -179,14 +179,15 @@ NSString * const NCRoomsManagerDidReceiveChatMessagesNotification = @"ChatMess
|
|||
}
|
||||
|
||||
TalkAccount *activeAccount = [[NCDatabaseManager sharedInstance] activeAccount];
|
||||
// Stop and remove chat controller
|
||||
NCRoom *room = [self roomWithToken:token forAccountId:activeAccount.accountId];
|
||||
NCChatController *chatController = [_chatControllers objectForKey:room.internalId];
|
||||
[chatController stopChatController];
|
||||
[_chatControllers removeObjectForKey:room.internalId];
|
||||
// Remove room controller and exit room
|
||||
NCRoomController *roomController = [_activeRooms objectForKey:token];
|
||||
if (roomController && !roomController.inCall && !roomController.inChat) {
|
||||
NCRoom *room = [self roomWithToken:token forAccountId:activeAccount.accountId];
|
||||
NCChatController *chatController = [_chatControllers objectForKey:room.internalId];
|
||||
[chatController stopChatController];
|
||||
[_chatControllers removeObjectForKey:room.internalId];
|
||||
[_activeRooms removeObjectForKey:token];
|
||||
|
||||
[[NCAPIController sharedInstance] exitRoom:token forAccount:activeAccount withCompletionBlock:^(NSError *error) {
|
||||
NSMutableDictionary *userInfo = [NSMutableDictionary new];
|
||||
if (!error) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче