aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/indexController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-01-29 14:19:16 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-29 14:19:16 +0100
commit8808fb4545d467f62fc82886d9f86bc63c8cf962 (patch)
tree98677be799a08841b03c956f97ce966353ea3a2c /app/Controllers/indexController.php
parent2e805f8c0b3d2c84755219f64aa5ae82eed3c73f (diff)
Fix keep state after favourites tags (#4178)
* Fix keep state after favourites tags #fix https://github.com/FreshRSS/FreshRSS/issues/4124 regression * Optimisation
Diffstat (limited to 'app/Controllers/indexController.php')
-rwxr-xr-xapp/Controllers/indexController.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php
index d9a59c5e3..8ec5bdb27 100755
--- a/app/Controllers/indexController.php
+++ b/app/Controllers/indexController.php
@@ -196,11 +196,14 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController {
'state', FreshRSS_Context::$user_conf->default_state
);
$state_forced_by_user = Minz_Request::param('state', false) !== false;
- if (FreshRSS_Context::$user_conf->default_view === 'adaptive' &&
- FreshRSS_Context::$get_unread <= 0 &&
- !FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_READ) &&
- !$state_forced_by_user) {
- FreshRSS_Context::$state |= FreshRSS_Entry::STATE_READ;
+ if (!$state_forced_by_user && !FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_READ)) {
+ if (FreshRSS_Context::$user_conf->default_view === 'adaptive' && FreshRSS_Context::$get_unread <= 0) {
+ FreshRSS_Context::$state |= FreshRSS_Entry::STATE_READ;
+ }
+ if (FreshRSS_Context::$user_conf->show_fav_unread &&
+ (FreshRSS_Context::isCurrentGet('s') || FreshRSS_Context::isCurrentGet('T') || FreshRSS_Context::isTag())) {
+ FreshRSS_Context::$state |= FreshRSS_Entry::STATE_READ;
+ }
}
FreshRSS_Context::$search = new FreshRSS_BooleanSearch(Minz_Request::param('search', ''));