diff options
author | Cesar Enrique Garcia Dabo <enrique@engarda.org> | 2020-04-11 02:21:56 +0200 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2020-04-23 12:37:24 +0200 |
commit | 5b4f3d29e4800f12297092ba6b6813581de77169 (patch) | |
tree | 69a25e4c8d9468b91f7dd3f506532d6caca9555c /js/app/Run.js | |
parent | a69ec8edd84511dfd760b6911ded8fdeea8c5aaa (diff) |
Always show the unread articles.
The unread articles folder will always be visible, regardless
of the "Show all" setting. If that setting is on, then an
additional "All articles" folder will be show as before, but
it doesn't substitute the "Uread articles" one.
A new URL /apps/news/#/items/unread is also created that jumps
to the unread articles.
Signed-off-by: Cesar Enrique Garcia Dabo <cquike@arcor.de>
Diffstat (limited to 'js/app/Run.js')
-rw-r--r-- | js/app/Run.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/js/app/Run.js b/js/app/Run.js index 0500faa35..1a1572864 100644 --- a/js/app/Run.js +++ b/js/app/Run.js @@ -17,7 +17,7 @@ app.run(function ($rootScope, $location, $http, $q, $interval, $route, Loading, // listen to keys in returned queries to automatically distribute the // incoming values to models Publisher.subscribe(ItemResource).toChannels(['items', 'newestItemId', - 'starred']); + 'starred', 'unread']); Publisher.subscribe(FolderResource).toChannels(['folders']); Publisher.subscribe(FeedResource).toChannels(['feeds']); Publisher.subscribe(SettingsResource).toChannels(['settings']); @@ -49,12 +49,16 @@ app.run(function ($rootScope, $location, $http, $q, $interval, $route, Loading, url = '/explore'; break; + case FEED_TYPE.UNREAD: + url = '/items/unread'; + break; + default: url = '/items'; } // only redirect if url is empty or faulty - if (!/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/ + if (!/^\/items(\/(starred|unread|explore|feeds\/\d+|folders\/\d+))?\/?$/ .test(path)) { $location.path(url); } @@ -126,4 +130,4 @@ app.run(function ($rootScope, $location, $http, $q, $interval, $route, Loading, $location.path('/items'); }); -});
\ No newline at end of file +}); |