mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 01:27:27 +00:00
android, desktop: keep the channel name after Configure relays (#8051)
* android, desktop: keep the channel name after Configure relays * android, desktop: prevent a second channel after Configure relays * android, desktop: keep the relays state after Configure relays * android, desktop: keep only the channel name and the running creation --------- Co-authored-by: spaced4ndy-agents <342056592+spaced4ndy-agents@users.noreply.github.com>
This commit is contained in:
1 parent
4e652b6b87
commit
fe999830e9
1 file changed
+6
-6
+6
-6
@@ -38,20 +38,20 @@ import dev.icerock.moko.resources.compose.painterResource
|
||||
import kotlinx.coroutines.*
|
||||
|
||||
@Composable
|
||||
fun AddChannelView(chatModel: ChatModel, rh: RemoteHostInfo?, close: () -> Unit, closeAll: () -> Unit) {
|
||||
fun ModalData.AddChannelView(chatModel: ChatModel, rh: RemoteHostInfo?, close: () -> Unit, closeAll: () -> Unit) {
|
||||
val rhId = rh?.remoteHostId
|
||||
val view = LocalMultiplatformView()
|
||||
val bottomSheetModalState = rememberModalBottomSheetState(initialValue = ModalBottomSheetValue.Hidden)
|
||||
val scope = rememberCoroutineScope()
|
||||
val displayName = rememberSaveable { mutableStateOf("") }
|
||||
val displayName = remember { stateGetOrPut("displayName") { "" } }
|
||||
val chosenImage = rememberSaveable { mutableStateOf<URI?>(null) }
|
||||
val profileImage = rememberSaveable { mutableStateOf<String?>(null) }
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
val hasRelays = rememberSaveable { mutableStateOf(true) }
|
||||
val groupInfo = remember { mutableStateOf<GroupInfo?>(null) }
|
||||
val groupLink = rememberSaveable(stateSaver = GroupLink.nullableStateSaver) { mutableStateOf<GroupLink?>(null) }
|
||||
val groupInfo = remember { stateGetOrPutNullable<GroupInfo>("groupInfo") { null } }
|
||||
val groupLink = remember { stateGetOrPutNullable<GroupLink>("groupLink") { null } }
|
||||
val groupRelays = remember { mutableStateOf<List<GroupRelay>>(emptyList()) }
|
||||
val creationInProgress = rememberSaveable { mutableStateOf(false) }
|
||||
val creationInProgress = remember { stateGetOrPut("creationInProgress") { false } }
|
||||
val showLinkStep = rememberSaveable { mutableStateOf(false) }
|
||||
val relayListExpanded = rememberSaveable { mutableStateOf(false) }
|
||||
|
||||
@@ -664,6 +664,6 @@ fun RelayProgressIndicator(active: Int, total: Int) {
|
||||
@Composable
|
||||
fun PreviewAddChannelView() {
|
||||
SimpleXTheme {
|
||||
AddChannelView(chatModel = ChatModel, rh = null, close = {}, closeAll = {})
|
||||
ModalData().AddChannelView(chatModel = ChatModel, rh = null, close = {}, closeAll = {})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user