Skip to content

Commit 4bb9933

Browse files
committed
[trello.com/c/aZtAfZ44]
1 parent c237ccd commit 4bb9933

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Adamant/Modules/ChatsList/ChatListViewController.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -973,14 +973,14 @@ extension ChatListViewController {
973973
) { [weak self] in
974974
guard let self else { return }
975975

976-
self.updateSelectedRow(chatroom: chatroom)
977976
self.presentChatroom(chatroom, with: transaction.chatMessageId)
978977
}
979978
}
980979
}
981980

982981
@MainActor
983982
func presentChatroom(_ chatroom: Chatroom, with message: String? = nil) {
983+
defer { updateSelectedRow(chatroom: chatroom) }
984984
// MARK: 1. Create and config ViewController
985985
let vc = chatViewController(for: chatroom, with: message)
986986

@@ -1603,8 +1603,6 @@ extension ChatListViewController: UISearchBarDelegate, UISearchResultsUpdating,
16031603
return
16041604
}
16051605

1606-
self?.updateSelectedRow(chatroom: chatroom)
1607-
16081606
presenter.presentChatroom(chatroom, with: message.transactionId)
16091607
}
16101608
}
@@ -1615,8 +1613,6 @@ extension ChatListViewController: UISearchBarDelegate, UISearchResultsUpdating,
16151613
return
16161614
}
16171615

1618-
self?.updateSelectedRow(chatroom: chatroom)
1619-
16201616
presenter.presentChatroom(chatroom)
16211617
}
16221618
}

0 commit comments

Comments
 (0)