Added warning if no entities were shown

This commit is contained in:
Marcin Kurczewski 2014-10-01 23:50:20 +02:00
parent ec8daf91fb
commit e1ae4eaa0d
2 changed files with 10 additions and 2 deletions

1
TODO
View file

@ -7,7 +7,6 @@ everything related to posts:
- comment count
- regard safety settings
- regard disliked settings
- add warning if no posts were found
- search filters
- comment:rr-
- comment_count: 3..5

View file

@ -128,9 +128,18 @@ App.Presenters.PagerPresenter = function(
return promise.make(function(resolve, reject) {
pager.retrieve()
.then(function(response) {
showPageList();
updateCallback(response, forceClear || !endlessScroll);
forceClear = false;
if (!response.entities.length) {
messagePresenter.showInfo($messages, 'No data to show');
if (pager.getVisiblePages().length === 1) {
hidePageList();
} else {
showPageList();
}
} else {
showPageList();
}
refreshPageList();
hideSpinner();