diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-19 17:09:23 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-19 17:09:23 +0100 |
commit | 53443fd1776658991091c9cc308fb86f7d3ac8ef (patch) | |
tree | 253e78f010af4e538c45fabf126dff9661ab75ee /js/app | |
parent | 746bdb08b44f0b13a7371962dfb85d28d4704680 (diff) |
show hint when no articles to read are availabe
Diffstat (limited to 'js/app')
-rw-r--r-- | js/app/Run.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/app/Run.js b/js/app/Run.js index aeca66298..b05df1930 100644 --- a/js/app/Run.js +++ b/js/app/Run.js @@ -58,7 +58,8 @@ app.run(function ($rootScope, $location, $http, $q, $interval, Loading, } // only redirect if url is empty or faulty - if (!/^\/items(\/(starred|feeds\/\d+|folders\/\d+))?\/?$/.test(path)) { + if (!/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/ + .test(path)) { $location.path(url); } @@ -86,6 +87,9 @@ app.run(function ($rootScope, $location, $http, $q, $interval, Loading, // cache Publisher.publishAll(feeds); Publisher.publishAll(folders); + if (feeds.feeds.length === 0 && folders.folders.length === 0) { + $location.path('/explore'); + } }); // disable loading if all initial requests finished |