android, desktop: hide private notes from share channel picker; hide share via chat on plain groups (#6958)

* ui: hide saved messages from share channel picker; hide share via chat on plain groups

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* plans: justify share channel link picker filter and group-link button gate

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Narasimha-sc
2026-05-13 15:43:06 +00:00
committed by GitHub
parent 7497b90e7c
commit c82bf05293
3 changed files with 124 additions and 2 deletions
@@ -258,7 +258,7 @@ fun GroupLinkLayout(
iconColor = MaterialTheme.colors.primary,
textColor = MaterialTheme.colors.primary,
)
if (shareGroupInfo != null) {
if (shareGroupInfo != null && isChannel) {
SettingsActionItem(
painterResource(MR.images.ic_forward),
stringResource(MR.strings.share_via_chat),
@@ -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 && it.chatInfo.sendMsgEnabled }.sortedByDescending { it.chatInfo is ChatInfo.Local }
val sorted = chatModel.chats.value.toList().filter { it.chatInfo.ready && it.chatInfo.sendMsgEnabled && !(chatModel.sharedContent.value is SharedContent.ChatLink && it.chatInfo is ChatInfo.Local) }.sortedByDescending { it.chatInfo is ChatInfo.Local }
filteredChats(mutableStateOf(false), mutableStateOf(null), search, sorted)
}
}