diff options
| author | 2014-10-22 18:21:36 +0200 | |
|---|---|---|
| committer | 2014-10-22 18:21:36 +0200 | |
| commit | 9551145200b61717fdeb11007e1da541ddf93f0f (patch) | |
| tree | f5d09af281d20e7df05a08193bcb959ef6b17369 /app/Controllers/indexController.php | |
| parent | eb60b82959d768b199985523e7d4e05ba4055591 (diff) | |
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
Diffstat (limited to 'app/Controllers/indexController.php')
| -rwxr-xr-x | app/Controllers/indexController.php | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |
