From 9551145200b61717fdeb11007e1da541ddf93f0f Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 22 Oct 2014 18:21:36 +0200 Subject: Better view mode - Seperate view mode from default state in conf - Load read articles if no unread articles only if view is adaptive See https://github.com/marienfressinaud/FreshRSS/issues/634 --- app/Controllers/indexController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Controllers/indexController.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index f9af2d0bb..2dd4c3068 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -126,13 +126,13 @@ class FreshRSS_index_Controller extends Minz_ActionController { private function updateContext() { FreshRSS_Context::_get(Minz_Request::param('get', 'a')); - // TODO: change default_view by default_state. FreshRSS_Context::$state = Minz_Request::param( - 'state', FreshRSS_Context::$conf->default_view + 'state', FreshRSS_Context::$conf->default_state ); $state_forced_by_user = Minz_Request::param('state', false) !== false; - if (FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) && + if (FreshRSS_Context::$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; } -- cgit v1.2.3