mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +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 {
|
private fun setContactAlias(chat: Chat, localAlias: String, chatModel: ChatModel) = withBGApi {
|
||||||
val chatRh = chat.remoteHostId
|
val chatRh = chat.remoteHostId
|
||||||
chatModel.controller.apiSetContactAlias(chatRh, chat.chatInfo.apiId, localAlias)?.let {
|
chatModel.controller.apiSetContactAlias(chatRh, chat.chatInfo.apiId, localAlias)?.let { contact ->
|
||||||
withChats {
|
withChats {
|
||||||
updateContact(chatRh, it)
|
updateContact(chatRh, contact)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,12 +69,12 @@ fun GroupMemberInfoView(
|
||||||
developerTools,
|
developerTools,
|
||||||
connectionCode,
|
connectionCode,
|
||||||
getContactChat = { chatModel.getContactChat(it) },
|
getContactChat = { chatModel.getContactChat(it) },
|
||||||
openDirectChat = {
|
openDirectChat = { contactId ->
|
||||||
withBGApi {
|
withBGApi {
|
||||||
val c = chatModel.controller.apiGetChat(rhId, ChatType.Direct, it)
|
val c = chatModel.controller.apiGetChat(rhId, ChatType.Direct, contactId)
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
withChats {
|
withChats {
|
||||||
if (chatModel.getContactChat(it) == null) {
|
if (chatModel.getContactChat(contactId) == null) {
|
||||||
addChat(c)
|
addChat(c)
|
||||||
}
|
}
|
||||||
chatModel.chatItemStatuses.clear()
|
chatModel.chatItemStatuses.clear()
|
||||||
|
|
|
@ -186,9 +186,9 @@ fun DeleteButton(onClick: () -> Unit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setContactAlias(rhId: Long?, contactConnection: PendingContactConnection, localAlias: String, chatModel: ChatModel) = withBGApi {
|
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 {
|
withChats {
|
||||||
updateContactConnection(rhId, it)
|
updateContactConnection(rhId, connection)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue