diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-03-19 22:47:06 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-03-19 22:47:06 +0100 |
| commit | 9e4709454ec13f400d9d74c453364e1df148959c (patch) | |
| tree | 5b5a1fc99b1e16d7b7511f861fed71fd9d82c4b8 | |
| parent | 695dc4ffafdbfe6220f60fe0cc7eedd0b241b0ed (diff) | |
Replace multiple classes with data-selected attribute
| -rw-r--r-- | src/Main.hs | 6 |
1 files 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 |