all repos — honk @ 4e3436d573bf6adc3554f9c70faf7c3815a311f9

my fork of honk

collapse option logic
Ted Unangst tedu@tedunangst.com
Tue, 26 Dec 2023 17:42:20 -0500
commit

4e3436d573bf6adc3554f9c70faf7c3815a311f9

parent

9907dbe8689c53815b2443172ac7f58f65eb2677

1 files changed, 5 insertions(+), 25 deletions(-)

jump to
M web.goweb.go

@@ -1322,31 +1322,11 @@ user, _ := butwhatabout(u.Username)

db := opendatabase() options := user.Options - if r.FormValue("skinny") == "skinny" { - options.SkinnyCSS = true - } else { - options.SkinnyCSS = false - } - if r.FormValue("omitimages") == "omitimages" { - options.OmitImages = true - } else { - options.OmitImages = false - } - if r.FormValue("mentionall") == "mentionall" { - options.MentionAll = true - } else { - options.MentionAll = false - } - if r.FormValue("inlineqts") == "inlineqts" { - options.InlineQuotes = true - } else { - options.InlineQuotes = false - } - if r.FormValue("maps") == "apple" { - options.MapLink = "apple" - } else { - options.MapLink = "" - } + options.SkinnyCSS = r.FormValue("skinny") == "skinny" + options.OmitImages = r.FormValue("omitimages") == "omitimages" + options.MentionAll = r.FormValue("mentionall") == "mentionall" + options.InlineQuotes = r.FormValue("inlineqts") == "inlineqts" + options.MapLink = r.FormValue("maps") options.Reaction = r.FormValue("reaction") sendupdate := false