diff options
| author | 2024-10-28 14:49:44 +0100 | |
|---|---|---|
| committer | 2024-10-28 14:49:44 +0100 | |
| commit | 1548fb0ff8a51e2de9c2e86df9d9ac9a3903c414 (patch) | |
| tree | 5abaf47bd4c010e3cad1c1f8b23db80c677d87c9 | |
| parent | Show the collapse_threads field in the user settings. (diff) | |
| download | snac2-1548fb0ff8a51e2de9c2e86df9d9ac9a3903c414.tar.gz snac2-1548fb0ff8a51e2de9c2e86df9d9ac9a3903c414.tar.xz snac2-1548fb0ff8a51e2de9c2e86df9d9ac9a3903c414.zip | |
Save the 'collapse_threads' from the web UI.
| -rw-r--r-- | html.c | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -3595,6 +3595,10 @@ int html_post_handler(const xs_dict *req, const char *q_path, | |||
| 3595 | snac.config = xs_dict_set(snac.config, "auto_boost", xs_stock(XSTYPE_TRUE)); | 3595 | snac.config = xs_dict_set(snac.config, "auto_boost", xs_stock(XSTYPE_TRUE)); |
| 3596 | else | 3596 | else |
| 3597 | snac.config = xs_dict_set(snac.config, "auto_boost", xs_stock(XSTYPE_FALSE)); | 3597 | snac.config = xs_dict_set(snac.config, "auto_boost", xs_stock(XSTYPE_FALSE)); |
| 3598 | if ((v = xs_dict_get(p_vars, "collapse_threads")) != NULL && strcmp(v, "on") == 0) | ||
| 3599 | snac.config = xs_dict_set(snac.config, "collapse_threads", xs_stock(XSTYPE_TRUE)); | ||
| 3600 | else | ||
| 3601 | snac.config = xs_dict_set(snac.config, "collapse_threads", xs_stock(XSTYPE_FALSE)); | ||
| 3598 | 3602 | ||
| 3599 | if ((v = xs_dict_get(p_vars, "metadata")) != NULL) { | 3603 | if ((v = xs_dict_get(p_vars, "metadata")) != NULL) { |
| 3600 | /* split the metadata and store it as a dict */ | 3604 | /* split the metadata and store it as a dict */ |