fix dark default

This commit is contained in:
Ryan Stafford 2023-08-08 18:03:03 -04:00
parent d8292bb9be
commit a96b5b1cd2

View file

@ -263,7 +263,7 @@ func Initialize(Host string, r *http.Request) (State, error) {
if dark := getCookie(r, "Dark"); dark != "" {
state.Dark = dark != "0"
} else {
state.Dark = os.Getenv("DARK") != "0"
state.Dark = os.Getenv("DARK") != ""
}
state.ShowNSFW = getCookie(r, "ShowNSFW") != ""
state.HideInstanceNames = getCookie(r, "HideInstanceNames") != ""