From 995cbc411c98d4513bf36b68c95c49822f1287ba Mon Sep 17 00:00:00 2001 From: The412Banner Date: Sat, 31 Oct 2026 18:24:50 +0000 Subject: [PATCH] fix(dual-screen): show the online friends above Steam chat's group chat list Steam gives its group chat list a fixed 114 px height plus an empty-list note, which covered the online friends in the bottom-screen chat. The list now shrinks to its rows (at most a quarter of the panel) and the note is hidden; the GROUP CHATS bar and its + button stay. --- .../main/java/com/droiddeck/launcher/ui/BottomChatPage.kt | 8 ++++++-- .../java/com/droiddeck/launcher/ui/BottomChatPageTest.kt | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/BottomChatPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/BottomChatPage.kt index a16640ef8..e609537b7 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/BottomChatPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/BottomChatPage.kt @@ -69,7 +69,9 @@ internal fun desktopUserAgent(webView: String?): String { /** * At the panel's own scale Steam's desktop chat gets about 600x300 CSS pixels and its friends list collapses, so the * page is laid out [cssWidth] wide and drawn at [scale]. Steam's site header (the rows before .chat_main_flex; its - * class name is generated) is hidden to leave the height to the friends list and the chat. + * class name is generated) is hidden to leave the height to the friends list and the chat. The group chat list keeps + * a fixed 114 px height and an empty-list note that cover the online friends, so it shrinks to its rows (at most a + * quarter of the panel) and the note is hidden. */ internal fun steamChatFitScript(cssWidth: Int, scale: Float): String { val zoom = "%.2f".format(java.util.Locale.US, scale) @@ -81,7 +83,9 @@ internal fun steamChatFitScript(cssWidth: Int, scale: Float): String { "window.dispatchEvent(new Event('resize'));})()" } -internal const val STEAM_CHAT_FIT_CSS = ".chat_main>:has(~.chat_main_flex){display:none!important}" +internal const val STEAM_CHAT_FIT_CSS = ".chat_main>:has(~.chat_main_flex){display:none!important}" + + ".ChatRoomList_Empty{display:none!important}" + + ".chatRoomListContainer{height:auto!important;max-height:25vh!important}" @Composable fun BottomChatPage() { diff --git a/app/src/test/java/com/droiddeck/launcher/ui/BottomChatPageTest.kt b/app/src/test/java/com/droiddeck/launcher/ui/BottomChatPageTest.kt index 2f3b5f113..34df15ff0 100644 --- a/app/src/test/java/com/droiddeck/launcher/ui/BottomChatPageTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/ui/BottomChatPageTest.kt @@ -29,6 +29,12 @@ class BottomChatPageTest { } } + @Test fun theGroupChatListLeavesRoomForTheOnlineFriends() { + assertTrue(STEAM_CHAT_FIT_CSS.contains(".ChatRoomList_Empty{display:none!important}")) + assertTrue(STEAM_CHAT_FIT_CSS.contains(".chatRoomListContainer{height:auto!important;max-height:25vh!important}")) + assertTrue(STEAM_CHAT_FIT_CSS.contains(".chat_main>:has(~.chat_main_flex){display:none!important}")) + } + @Test fun desktopAgentKeepsTheWebViewChromeVersion() { val ua = desktopUserAgent("Mozilla/5.0 (Linux; Android 15; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/141.0.7390.122 Mobile Safari/537.36") assertEquals("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.7390.122 Safari/537.36", ua)