aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-10-28 14:49:44 +0100
committerdefault <nobody@localhost>2024-10-28 14:49:44 +0100
commit1548fb0ff8a51e2de9c2e86df9d9ac9a3903c414 (patch)
tree5abaf47bd4c010e3cad1c1f8b23db80c677d87c9
parentbf6dd8016f666382386f1c3291edd4f2b369746f (diff)
Save the 'collapse_threads' from the web UI.
-rw-r--r--html.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/html.c b/html.c
index ef24690..f91742f 100644
--- a/html.c
+++ b/html.c
@@ -3595,6 +3595,10 @@ int html_post_handler(const xs_dict *req, const char *q_path,
snac.config = xs_dict_set(snac.config, "auto_boost", xs_stock(XSTYPE_TRUE));
else
snac.config = xs_dict_set(snac.config, "auto_boost", xs_stock(XSTYPE_FALSE));
+ if ((v = xs_dict_get(p_vars, "collapse_threads")) != NULL && strcmp(v, "on") == 0)
+ snac.config = xs_dict_set(snac.config, "collapse_threads", xs_stock(XSTYPE_TRUE));
+ else
+ snac.config = xs_dict_set(snac.config, "collapse_threads", xs_stock(XSTYPE_FALSE));
if ((v = xs_dict_get(p_vars, "metadata")) != NULL) {
/* split the metadata and store it as a dict */