Open TimTree opened 4 years ago
Thanks to a recent update to the hyvor-talk-react
plugin, I was able to implement dark mode comments in commit 19ef83d.
However, the comments will not change color schemes if the user toggles the theme after the comments have loaded. For that to happen, I'll probably need to use the above solution.
It is indeed possible to dynamically change the comments colors for dark mode: https://talk.hyvor.com/documentation/faq/dynamically-change-colors
The solution is to run
hyvor_talk.setPalette(PALETTE_OBJ_FOR_DARK_MODE);
in the JavaScript function that swaps light/dark mode. However, the plugingatsby-plugin-dark-mode
injects a predefined dark mode function, which I cannot easily modify. I may need to re-implement dark mode from scratch, a nontrivial task.