Fixed promises and its race conditions

This commit is contained in:
Marcin Kurczewski
2014-10-02 00:30:25 +02:00
parent e1ae4eaa0d
commit 455ae2b881
18 changed files with 113 additions and 59 deletions

View File

@ -34,6 +34,9 @@ App.PresenterManager = function(jQuery, topNavigationPresenter, keyboard) {
}, 100);
if (lastContentPresenter === null || lastContentPresenter.name !== presenter.name) {
if (lastContentPresenter !== null && lastContentPresenter.deinit) {
lastContentPresenter.deinit();
}
keyboard.reset();
topNavigationPresenter.changeTitle(null);
topNavigationPresenter.focus();