From bfd86f9817cac5a81f12ec56696f006d27652130 Mon Sep 17 00:00:00 2001 From: Paul Hitt Date: Fri, 11 Sep 2026 21:10:52 -0400 Subject: [PATCH] Say which side of a private reaction you are on The chip read "private" to everybody who could see it, which says the least useful thing to each of them. The person who sent it is now told who saw it, and the author is told that nobody else did. Co-Authored-By: Claude Opus 5 --- .../kotlin/io/flamenet/messenger/app/ChatScreens.kt | 10 +++++++++- .../flamenet/messenger/app/PrivateReactionSendTest.kt | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt b/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt index 215cc86..7674faa 100644 --- a/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt +++ b/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt @@ -1785,6 +1785,7 @@ fun ColumnScope.ChatScreen( Bubble( line = line, model = model, + myUserId = myUserId, authorName = when { line.mine || chat.group == null -> { @@ -2318,6 +2319,8 @@ private fun ColumnScope.VoiceComposer( private fun Bubble( line: Session.Line, model: MessengerViewModel, + /** Ours, so a private reaction can say which side of it you are on. */ + myUserId: Long = 0L, authorName: String = "", picture: io.flamenet.e2e.Attachment.Ref? = null, ) { @@ -2530,7 +2533,12 @@ private fun Bubble( // should not be mistaken for one the group watched arrive. line.privateReactions.entries.sortedBy { it.key }.forEach { (emoji, who) -> Text( - if (who.size == 1) "$emoji private" else "$emoji ${who.size} private", + run { + // The person who sent it is told who saw it; + // the author is told that nobody else did. + val side = if (myUserId in who) "only them" else "only you" + if (who.size == 1) "$emoji $side" else "$emoji ${who.size} $side" + }, fontSize = 13.sp, color = Palette.SecondaryText, modifier = diff --git a/app/src/test/kotlin/io/flamenet/messenger/app/PrivateReactionSendTest.kt b/app/src/test/kotlin/io/flamenet/messenger/app/PrivateReactionSendTest.kt index c27a090..85803a4 100644 --- a/app/src/test/kotlin/io/flamenet/messenger/app/PrivateReactionSendTest.kt +++ b/app/src/test/kotlin/io/flamenet/messenger/app/PrivateReactionSendTest.kt @@ -73,5 +73,8 @@ class PrivateReactionSendTest { assertTrue(chat.contains("react-private-toggle"), "no way to choose a private reaction") assertTrue(chat.contains("privately = privately")) assertTrue(chat.contains("line.privateReactions.entries"), "private reactions are not drawn") + // The same chip has to read correctly from both sides of it. + assertTrue(chat.contains("\"only them\"")) + assertTrue(chat.contains("\"only you\"")) } }