From 026e349db81d368fbdc6404996216e0ad48ce046 Mon Sep 17 00:00:00 2001 From: weishaupt Date: Sat, 10 Oct 2026 03:16:02 -0400 Subject: [PATCH] No mention highlight on join/part/quit lines, bump to 0.1.11 Only chat, action and notice lines get the mention tint now. Join, part, quit, nick and mode lines about you always contain your nick, so every one of your own joins used to be highlighted as a mention. Co-Authored-By: Claude Opus 5.5 --- build.gradle.kts | 4 ++-- src/main/kotlin/ui/ChannelScreen.kt | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6099299..aef1b37 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "com.tpuahsiew.wirc" -version = "0.1.10" +version = "0.1.11" // No project-level repositories{} block here: settings.gradle.kts sets // dependencyResolutionManagement.repositoriesMode = FAIL_ON_PROJECT_REPOS and already @@ -38,7 +38,7 @@ compose.desktop { appResourcesRootDir.set(project.file("installerResources")) targetFormats(TargetFormat.Msi, TargetFormat.Exe) packageName = "wIRC" - packageVersion = "0.1.10" + packageVersion = "0.1.11" windows { menuGroup = "wIRC" upgradeUuid = "8f14e45f-ceea-4a5e-9c3b-5b1f0e8c2b7a" diff --git a/src/main/kotlin/ui/ChannelScreen.kt b/src/main/kotlin/ui/ChannelScreen.kt index 685f964..a4580d6 100644 --- a/src/main/kotlin/ui/ChannelScreen.kt +++ b/src/main/kotlin/ui/ChannelScreen.kt @@ -1031,7 +1031,10 @@ fun MessageScrollback( ) { msg -> val ts = timeFormat.format(Date(msg.timestampMillis)) val bodyAnnotated = parseMircToAnnotatedString(msg.rawText, textColor) - val mentioned = isMention(msg.rawText) + // Only real messages get the mention tint. Join/part/quit/nick/mode lines + // always contain your nick when they're about you ("you joined #chan"), + // which used to light up every one of your own joins. + val mentioned = msg.kind in MENTION_KINDS && isMention(msg.rawText) val nickColor = if (displaySettings.nickColorsEnabled) colorForNick(msg.sender ?: "") else textColor val mutedColor = textColor.copy(alpha = 0.7f) val prefix = rowPrefix(msg, ts, mutedColor, nickColor) @@ -1399,6 +1402,8 @@ private fun MentionColorPickerDialog(currentArgb: Int, onDismiss: () -> Unit, on ) } +private val MENTION_KINDS = setOf(MessageKind.CHAT, MessageKind.ACTION, MessageKind.NOTICE) + @Composable private fun WindowSettingsPanel( displaySettings: WindowDisplaySettings,