From 9e4709454ec13f400d9d74c453364e1df148959c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 19 Mar 2026 22:47:06 +0100 Subject: Replace multiple classes with data-selected attribute --- src/Main.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index a1f4f5e..440d212 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -482,8 +482,7 @@ selectConversation gs@GlobalState {..} conv = do JS.getElementById "body" >>= \case Just body -> do - js_classList_remove body (toJSString "peer-selected") - js_classList_add body (toJSString "conversation-selected") + js_setAttribute body (toJSString "data-selected") (toJSString "conversation") Nothing -> return () return $ SelectedConversation conv @@ -515,8 +514,7 @@ selectPeer GlobalState {..} server dgst = do JS.getElementById "body" >>= \case Just body -> do - js_classList_remove body (toJSString "conversation-selected") - js_classList_add body (toJSString "peer-selected") + js_setAttribute body (toJSString "data-selected") (toJSString "peer") Nothing -> return () return selected -- cgit v1.2.3