From 6f23999c7b3de1a69fea4dea056aed2548c4a32d Mon Sep 17 00:00:00 2001 From: Prashant Tholia <65695939+prashanttholia@users.noreply.github.com> Date: Mon, 2 Nov 2020 16:33:16 +0530 Subject: Remember open categories (#3185) * feature(normal) - Remember opened categories in the left menu Session storage based implementation to remember opened categories in left menu Issue Ref: #2248 * lib_phpQuery updates * Updates covering feedback points and functionality fixes * Feedback updates * Revert "lib_phpQuery updates" This reverts commit dcd23b9418405a2d14ee03c1fcadf90c04b267e1. * First review Change variable name to "remember" instead of "open". Start using localStorage instead of sessionStorage. Simplify code. * Simplify remember categories init function Replace 'session' with 'local' in function names and comment Set open categories CSS as same as when category is opened in 'active' unfold mode * Remove URLSearchParams check in remember categories init function * Delete open categories on login and logout * JSHint check fix * Second review * Make new mode the default for new users * Always open active category * Reduce / simplify code * i18n French * Revert default value Wait a bit more for this decision / change Co-authored-by: Alexandre Alapetite --- app/Models/Context.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/Context.php') diff --git a/app/Models/Context.php b/app/Models/Context.php index c5dcbdcdb..8be73f407 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -71,7 +71,7 @@ class FreshRSS_Context { } //Legacy < 1.16.1 - if (!in_array(FreshRSS_Context::$user_conf->display_categories, [ 'active', 'all', 'none' ], true)) { + if (!in_array(FreshRSS_Context::$user_conf->display_categories, [ 'active', 'remember', 'all', 'none' ], true)) { FreshRSS_Context::$user_conf->display_categories = FreshRSS_Context::$user_conf->display_categories === true ? 'all' : 'active'; } } -- cgit v1.2.3