From a7c6f0af9570679f84555da4d4a9c4201bf4c40f Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 19 Apr 2026 14:13:13 +0100 Subject: [PATCH] ui: fix link icons, use backward compatible Java api (#6839) Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com> --- apps/ios/Shared/Views/NewChat/AddChannelView.swift | 4 ++-- apps/ios/Shared/Views/NewChat/AddGroupView.swift | 2 +- .../chat/simplex/common/views/chat/item/TextItemView.kt | 2 +- .../chat/simplex/common/views/chatlist/ShareListView.kt | 2 +- .../chat/simplex/common/views/newchat/AddChannelView.kt | 4 ++-- .../kotlin/chat/simplex/common/views/newchat/AddGroupView.kt | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/ios/Shared/Views/NewChat/AddChannelView.swift b/apps/ios/Shared/Views/NewChat/AddChannelView.swift index e3409029e5..5a07084fa6 100644 --- a/apps/ios/Shared/Views/NewChat/AddChannelView.swift +++ b/apps/ios/Shared/Views/NewChat/AddChannelView.swift @@ -47,7 +47,7 @@ struct AddChannelView: View { Group { ZStack(alignment: .center) { ZStack(alignment: .topTrailing) { - ProfileImage(imageStr: profile.image, size: 128) + ProfileImage(imageStr: profile.image, iconName: "antenna.radiowaves.left.and.right.circle.fill", size: 128) if profile.image != nil { Button { profile.image = nil @@ -256,7 +256,7 @@ struct AddChannelView: View { let total = groupRelays.count return List { Group { - ProfileImage(imageStr: gInfo.groupProfile.image, size: 128) + ProfileImage(imageStr: gInfo.groupProfile.image, iconName: "antenna.radiowaves.left.and.right.circle.fill", size: 128) .frame(maxWidth: .infinity, alignment: .center) Text(gInfo.groupProfile.displayName) diff --git a/apps/ios/Shared/Views/NewChat/AddGroupView.swift b/apps/ios/Shared/Views/NewChat/AddGroupView.swift index c74e016974..87cf377623 100644 --- a/apps/ios/Shared/Views/NewChat/AddGroupView.swift +++ b/apps/ios/Shared/Views/NewChat/AddGroupView.swift @@ -68,7 +68,7 @@ struct AddGroupView: View { Group { ZStack(alignment: .center) { ZStack(alignment: .topTrailing) { - ProfileImage(imageStr: profile.image, size: 128) + ProfileImage(imageStr: profile.image, iconName: "person.2.circle.fill", size: 128) if profile.image != nil { Button { profile.image = nil diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TextItemView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TextItemView.kt index 9db87b156d..15d67d8e20 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TextItemView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/item/TextItemView.kt @@ -544,7 +544,7 @@ fun stripTextLink(text: String, link: String): String = fun stripFormattedTextLink(ft: List?, link: String): List? { if (ft == null || ft.isEmpty() || ft.last().text != link) return ft val result = ft.toMutableList() - result.removeLast() + result.removeAt(result.lastIndex) val i = result.lastIndex if (i >= 0 && result[i].format == null && result[i].text.endsWith("\n")) { result[i] = FormattedText(result[i].text.dropLast(1), null) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ShareListView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ShareListView.kt index cf92ec2f49..2be17052ad 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ShareListView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ShareListView.kt @@ -196,7 +196,7 @@ private fun ShareList( val oneHandUI = remember { appPrefs.oneHandUI.state } val chats by remember(search) { derivedStateOf { - val sorted = chatModel.chats.value.toList().filter { it.chatInfo.ready }.sortedByDescending { it.chatInfo is ChatInfo.Local } + val sorted = chatModel.chats.value.toList().filter { it.chatInfo.ready && it.chatInfo.sendMsgEnabled }.sortedByDescending { it.chatInfo is ChatInfo.Local } filteredChats(mutableStateOf(false), mutableStateOf(null), search, sorted) } } 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 2f030ef1dc..a0e1359e90 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 @@ -249,7 +249,7 @@ private fun ProfileStepView( ) { Box(contentAlignment = Alignment.TopEnd) { Box(contentAlignment = Alignment.Center) { - ProfileImage(108.dp, image = profileImage.value) + ProfileImage(108.dp, image = profileImage.value, icon = MR.images.ic_bigtop_updates_circle_filled) EditImageButton { scope.launch { bottomSheetModalState.show() } } } if (profileImage.value != null) { @@ -376,7 +376,7 @@ private fun ProgressStepView( Modifier.fillMaxWidth().padding(bottom = 8.dp), contentAlignment = Alignment.Center ) { - ProfileImage(108.dp, image = gInfo.groupProfile.image) + ProfileImage(108.dp, image = gInfo.groupProfile.image, icon = MR.images.ic_bigtop_updates_circle_filled) } Text( gInfo.groupProfile.displayName, diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt index 0494cbb463..d197460e2e 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/AddGroupView.kt @@ -108,7 +108,7 @@ fun AddGroupLayout( ) { Box(contentAlignment = Alignment.TopEnd) { Box(contentAlignment = Alignment.Center) { - ProfileImage(108.dp, image = profileImage.value) + ProfileImage(108.dp, image = profileImage.value, icon = MR.images.ic_supervised_user_circle_filled) EditImageButton { scope.launch { bottomSheetModalState.show() } } } if (profileImage.value != null) {