Added warning if no entities were shown
This commit is contained in:
parent
ec8daf91fb
commit
e1ae4eaa0d
2 changed files with 10 additions and 2 deletions
1
TODO
1
TODO
|
@ -7,7 +7,6 @@ everything related to posts:
|
||||||
- comment count
|
- comment count
|
||||||
- regard safety settings
|
- regard safety settings
|
||||||
- regard disliked settings
|
- regard disliked settings
|
||||||
- add warning if no posts were found
|
|
||||||
- search filters
|
- search filters
|
||||||
- comment:rr-
|
- comment:rr-
|
||||||
- comment_count: 3..5
|
- comment_count: 3..5
|
||||||
|
|
|
@ -128,9 +128,18 @@ App.Presenters.PagerPresenter = function(
|
||||||
return promise.make(function(resolve, reject) {
|
return promise.make(function(resolve, reject) {
|
||||||
pager.retrieve()
|
pager.retrieve()
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
showPageList();
|
|
||||||
updateCallback(response, forceClear || !endlessScroll);
|
updateCallback(response, forceClear || !endlessScroll);
|
||||||
forceClear = false;
|
forceClear = false;
|
||||||
|
if (!response.entities.length) {
|
||||||
|
messagePresenter.showInfo($messages, 'No data to show');
|
||||||
|
if (pager.getVisiblePages().length === 1) {
|
||||||
|
hidePageList();
|
||||||
|
} else {
|
||||||
|
showPageList();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
showPageList();
|
||||||
|
}
|
||||||
|
|
||||||
refreshPageList();
|
refreshPageList();
|
||||||
hideSpinner();
|
hideSpinner();
|
||||||
|
|
Loading…
Reference in a new issue