mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed promises and its race conditions
This commit is contained in:
@ -25,7 +25,7 @@ App.Presenters.PostListPresenter = function(
|
||||
topNavigationPresenter.changeTitle('Posts');
|
||||
searchArgs = util.parseComplexRouteArgs(args.searchArgs);
|
||||
|
||||
promise.waitAll(
|
||||
promise.wait(
|
||||
util.promiseTemplate('post-list'),
|
||||
util.promiseTemplate('post-list-item'))
|
||||
.then(function(listHtml, itemHtml) {
|
||||
@ -60,6 +60,10 @@ App.Presenters.PostListPresenter = function(
|
||||
order: searchArgs.order}});
|
||||
}
|
||||
|
||||
function deinit() {
|
||||
pagerPresenter.deinit();
|
||||
}
|
||||
|
||||
function render() {
|
||||
$el.html(listTemplate());
|
||||
$searchInput = $el.find('input[name=query]');
|
||||
@ -107,6 +111,7 @@ App.Presenters.PostListPresenter = function(
|
||||
return {
|
||||
init: init,
|
||||
reinit: reinit,
|
||||
deinit: deinit,
|
||||
render: render,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user