mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
android: rework incognito mode - choose when making connection (#2867)
* android: rework incognito mode - choose when making connection * remove commented code * remove commented code * change text * text editor border * smaller qr code * chat preview height * fix spacing * desktop dialogue * remove import --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
+14
-1
@@ -1,7 +1,13 @@
|
||||
package chat.simplex.common.views.helpers
|
||||
|
||||
import androidx.compose.foundation.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Surface
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.key.*
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.*
|
||||
import chat.simplex.common.DialogParams
|
||||
import chat.simplex.res.MR
|
||||
@@ -21,6 +27,8 @@ actual fun DefaultDialog(
|
||||
) {
|
||||
Dialog(
|
||||
undecorated = true,
|
||||
transparent = true,
|
||||
resizable = false,
|
||||
title = "",
|
||||
onCloseRequest = onDismissRequest,
|
||||
onPreviewKeyEvent = { event ->
|
||||
@@ -29,7 +37,12 @@ actual fun DefaultDialog(
|
||||
} else false
|
||||
}
|
||||
) {
|
||||
content()
|
||||
Surface(
|
||||
Modifier
|
||||
.border(border = BorderStroke(1.dp, MaterialTheme.colors.secondary.copy(alpha = 0.3F)), shape = RoundedCornerShape(8))
|
||||
) {
|
||||
content()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@ import chat.simplex.common.model.ChatModel
|
||||
@Composable
|
||||
actual fun ScanToConnectView(chatModel: ChatModel, close: () -> Unit) {
|
||||
ConnectContactLayout(
|
||||
chatModelIncognito = chatModel.incognito.value,
|
||||
chatModel = chatModel,
|
||||
incognitoPref = chatModel.controller.appPrefs.incognito,
|
||||
close = close
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user