OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Toggling darkmode via chat doesn't toggle the statpanel browser's theme

Open ike709 opened this issue 1 year ago • 3 comments

Tested on Paradise. In BYOND, toggling the chat theme should automatically toggle the DMF color. But in OpenDream, you have to run the "Toggle Darkmode" verb separately for the DMF to change.

Proof of BYOND behavior: https://github.com/OpenDreamProject/OpenDream/assets/5714543/15eb695f-1461-4518-81c2-53eb46510ff3

ike709 avatar Jul 02 '24 05:07 ike709

This was fixed for TG but Paradise must handle it differently because it's still an issue there.

ike709 avatar Aug 20 '24 17:08 ike709

Paradise seems to handle it via cookies:

$('#toggleDarkChat').click(function(e) {
        internalOutput('<span class="internal boldnshit">Dark Chat toggled. Reconnecting to chat.</span>', 'internal');
        var backlog = $messages.html()
        if(getCookie('darkChat') == "on"){
            setCookie('darkChat', "off", 365)
        } else {
            setCookie('darkChat', "on", 365)
        }
        localStorage.setItem('backlog', backlog)
        location.reload();
    });

ike709 avatar Aug 20 '24 17:08 ike709

This seems to be an issue with us canceling the reload if the paths are identical, but not canceling identical paths causes goonchat to have a seizure. I'm not sure how to differentiate paths that should be canceled from paths that shouldn't.

image

ike709 avatar Aug 20 '24 17:08 ike709