desktop: use correct remote host when creating/connecting via links (#3409)

This commit is contained in:
Evgeny Poberezkin
2023-11-20 20:56:05 +00:00
committed by GitHub
parent 96d3c9988c
commit 7f5efd8927
12 changed files with 43 additions and 39 deletions
@@ -2,9 +2,10 @@ package chat.simplex.common.views.newchat
import androidx.compose.runtime.*
import chat.simplex.common.model.ChatModel
import chat.simplex.common.model.RemoteHostInfo
@Composable
actual fun ConnectViaLinkView(m: ChatModel, rhId: Long?, close: () -> Unit) {
actual fun ConnectViaLinkView(m: ChatModel, rh: RemoteHostInfo?, close: () -> Unit) {
// TODO this should close if remote host changes in model
PasteToConnectView(m, rhId, close)
PasteToConnectView(m, rh, close)
}
@@ -2,12 +2,13 @@ package chat.simplex.common.views.newchat
import androidx.compose.runtime.Composable
import chat.simplex.common.model.ChatModel
import chat.simplex.common.model.RemoteHostInfo
@Composable
actual fun ScanToConnectView(chatModel: ChatModel, rhId: Long?, close: () -> Unit) {
actual fun ScanToConnectView(chatModel: ChatModel, rh: RemoteHostInfo?, close: () -> Unit) {
ConnectContactLayout(
chatModel = chatModel,
rhId = rhId,
rh = rh,
incognitoPref = chatModel.controller.appPrefs.incognito,
close = close
)