mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 12:19:54 +00:00
adapt code
This commit is contained in:
parent
acba0b4a7d
commit
56b9d73234
3 changed files with 7 additions and 7 deletions
|
@ -793,9 +793,9 @@ suspend fun save(applyToMode: DefaultThemeMode?, newTheme: ThemeModeOverride?, c
|
|||
|
||||
private fun setContactAlias(chat: Chat, localAlias: String, chatModel: ChatModel) = withBGApi {
|
||||
val chatRh = chat.remoteHostId
|
||||
chatModel.controller.apiSetContactAlias(chatRh, chat.chatInfo.apiId, localAlias)?.let {
|
||||
chatModel.controller.apiSetContactAlias(chatRh, chat.chatInfo.apiId, localAlias)?.let { contact ->
|
||||
withChats {
|
||||
updateContact(chatRh, it)
|
||||
updateContact(chatRh, contact)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,12 +69,12 @@ fun GroupMemberInfoView(
|
|||
developerTools,
|
||||
connectionCode,
|
||||
getContactChat = { chatModel.getContactChat(it) },
|
||||
openDirectChat = {
|
||||
openDirectChat = { contactId ->
|
||||
withBGApi {
|
||||
val c = chatModel.controller.apiGetChat(rhId, ChatType.Direct, it)
|
||||
val c = chatModel.controller.apiGetChat(rhId, ChatType.Direct, contactId)
|
||||
if (c != null) {
|
||||
withChats {
|
||||
if (chatModel.getContactChat(it) == null) {
|
||||
if (chatModel.getContactChat(contactId) == null) {
|
||||
addChat(c)
|
||||
}
|
||||
chatModel.chatItemStatuses.clear()
|
||||
|
|
|
@ -186,9 +186,9 @@ fun DeleteButton(onClick: () -> Unit) {
|
|||
}
|
||||
|
||||
private fun setContactAlias(rhId: Long?, contactConnection: PendingContactConnection, localAlias: String, chatModel: ChatModel) = withBGApi {
|
||||
chatModel.controller.apiSetConnectionAlias(rhId, contactConnection.pccConnId, localAlias)?.let {
|
||||
chatModel.controller.apiSetConnectionAlias(rhId, contactConnection.pccConnId, localAlias)?.let { connection ->
|
||||
withChats {
|
||||
updateContactConnection(rhId, it)
|
||||
updateContactConnection(rhId, connection)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue