mirror of https://github.com/lidarr/Lidarr
sync event instead of promise
This commit is contained in:
parent
195cf97303
commit
a15fb00c35
|
@ -16,17 +16,18 @@ define(
|
|||
|
||||
initialize: function () {
|
||||
this.updateCollection = new UpdateCollection();
|
||||
|
||||
this.listenTo(this.updateCollection, 'sync', this._showUpdates);
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
this.updates.show(new LoadingView());
|
||||
|
||||
var self = this;
|
||||
var promise = this.updateCollection.fetch();
|
||||
this.updateCollection.fetch();
|
||||
},
|
||||
|
||||
promise.done(function (){
|
||||
self.updates.show(new UpdateCollectionView({ collection: self.updateCollection }));
|
||||
});
|
||||
_showUpdates: function () {
|
||||
this.updates.show(new UpdateCollectionView({ collection: this.updateCollection }));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue