From d9cfc9bd3dc81d3a5956ce71f9357cf7bdacaee1 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Fri, 8 May 2026 06:27:26 +0000 Subject: [PATCH] ui: adjust create channel ui (#6950) --- apps/ios/Shared/Views/NewChat/AddChannelView.swift | 8 +++----- .../common/views/chat/group/GroupLinkView.kt | 9 +++++++-- .../simplex/common/views/newchat/AddChannelView.kt | 14 ++++++++------ .../src/commonMain/resources/MR/base/strings.xml | 1 + 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/apps/ios/Shared/Views/NewChat/AddChannelView.swift b/apps/ios/Shared/Views/NewChat/AddChannelView.swift index 477f7eef8e..7caeec17bb 100644 --- a/apps/ios/Shared/Views/NewChat/AddChannelView.swift +++ b/apps/ios/Shared/Views/NewChat/AddChannelView.swift @@ -338,6 +338,9 @@ struct AddChannelView: View { .compactSectionSpacing() Section { + Button("Cancel and delete channel", role: .destructive) { + showCancelChannelAlert(gInfo) + } Button("Continue") { if activeCount >= total { showLinkStep = true @@ -365,11 +368,6 @@ struct AddChannelView: View { } .navigationTitle("Creating channel") .navigationBarBackButtonHidden(true) - .toolbar { - ToolbarItem(placement: .navigationBarTrailing) { - Button("Delete channel") { showCancelChannelAlert(gInfo) } - } - } .onDisappear { if !showLinkStep && m.creatingChannelId == gInfo.id { showCancelChannelAlert(gInfo) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupLinkView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupLinkView.kt index c0b107b5dd..57ba0fbd88 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupLinkView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupLinkView.kt @@ -281,8 +281,13 @@ fun GroupLinkLayout( ) } if (creatingGroup && close != null) { - Spacer(Modifier.height(DEFAULT_PADDING_HALF)) - ContinueButton(close) + SettingsActionItem( + painterResource(MR.images.ic_check), + stringResource(MR.strings.continue_to_next_step), + click = close, + iconColor = MaterialTheme.colors.primary, + textColor = MaterialTheme.colors.primary, + ) } } } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt index 941d232776..1937cb3554 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddChannelView.kt @@ -404,11 +404,6 @@ private fun ProgressStepView( ModalView( close = { showCancelAlert() }, showClose = false, - endButtons = { - TextButton(onClick = { showCancelAlert() }) { - Text(generalGetString(MR.strings.button_delete_channel)) - } - } ) { ColumnWithScrollBar { AppBarTitle(generalGetString(MR.strings.creating_channel)) @@ -481,9 +476,16 @@ private fun ProgressStepView( Spacer(Modifier.height(16.dp)) SectionView { + SettingsActionItem( + painterResource(MR.images.ic_delete), + generalGetString(MR.strings.button_cancel_and_delete_channel), + click = { showCancelAlert() }, + textColor = Color.Red, + iconColor = Color.Red, + ) val enabled = activeCount > 0 SettingsActionItem( - painterResource(MR.images.ic_link), + painterResource(MR.images.ic_check), generalGetString(MR.strings.continue_to_next_step), click = { if (activeCount >= total) { diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml index b21f1b5627..ffc7810d92 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml @@ -1887,6 +1887,7 @@ you: %1$s Delete group Delete channel + Cancel and delete channel Delete chat Delete group? Delete channel?