From 8a5b2094b760bb012f990a5056c1cebe1f257464 Mon Sep 17 00:00:00 2001 From: Ryan Stafford Date: Thu, 18 Apr 2024 19:16:01 -0400 Subject: [PATCH] fix darkmode toggle --- routes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routes.go b/routes.go index c2176b6..937084c 100644 --- a/routes.go +++ b/routes.go @@ -770,6 +770,9 @@ func Settings(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { } else if r.FormValue("darkmode") != "" { setCookie(w, "", "Dark", "1") *state.Dark = true + } else { + setCookie(w, "", "Dark", "0") + *state.Dark = false } if r.FormValue("shownsfw") != "" { setCookie(w, "", "ShowNSFW", "1")