This commit is contained in:
Bernhard Posselt 2014-04-09 16:53:00 +02:00
Родитель 3b5d012b57
Коммит 8588c46028
2 изменённых файлов: 5 добавлений и 14 удалений

Просмотреть файл

@ -37,20 +37,16 @@ $rootScope, $q) ->
###
Loads the initial data from the server
###
successCount = 0
@deferred = $q.defer()
@getAllFolders()
successCallback = =>
if successCount == 1
@deferred.resolve()
else
successCount++
@deferred.resolve()
@getAllFeeds(successCallback)
@getSettings(successCallback)
@getSettings()
# items can only be loaded after the active feed is known

Просмотреть файл

@ -3387,20 +3387,15 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
Loads the initial data from the server
*/
var successCallback, successCount,
var successCallback,
_this = this;
successCount = 0;
this.deferred = $q.defer();
this.getAllFolders();
successCallback = function() {
if (successCount === 1) {
return _this.deferred.resolve();
} else {
return successCount++;
}
return _this.deferred.resolve();
};
this.getAllFeeds(successCallback);
this.getSettings(successCallback);
this.getSettings();
this.getActiveFeed(function() {
return _this.getItems(_this._activeFeed.getType(), _this._activeFeed.getId());
});