Remove used of Client.onApps

This commit is contained in:
Girish Ramakrishnan
2018-06-25 20:15:01 -07:00
parent f3cf640e21
commit afe837e30a
2 changed files with 2 additions and 22 deletions
-10
View File
@@ -105,7 +105,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
function Client() {
this._ready = false;
this._configListener = [];
this._appsListener = [];
this._readyListener = [];
this._userInfo = {
id: null,
@@ -205,11 +204,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
if (this._config && this._config.apiServerOrigin) callback(this._config);
};
Client.prototype.onApps = function (callback) {
this._appsListener.push(callback);
callback(this._installedApps);
};
Client.prototype.resetAvatar = function () {
this.avatar = this.apiOrigin + '/api/v1/cloudron/avatar?' + String(Math.random()).slice(2);
@@ -1138,10 +1132,6 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
that._installedApps = that._installedApps.sort(function (app1, app2) { return app1.fqdn.localeCompare(app2.fqdn); });
that._appsListener.forEach(function (callback) {
callback(that._installedApps);
});
callback(null);
});
};