Make the appstore filter toolbar work with repositories
This commit is contained in:
+5
-6
@@ -3330,9 +3330,10 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
var that = this;
|
||||
|
||||
callback = callback || function () {};
|
||||
repository = repository || 'core';
|
||||
|
||||
get('/api/v1/appstore/apps?repository=' + repository, null, function (error, data, status) {
|
||||
this._appstoreRepository = repository || 'core';
|
||||
|
||||
get('/api/v1/appstore/apps?repository=' + this._appstoreRepository, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
@@ -3343,11 +3344,9 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
};
|
||||
|
||||
Client.prototype.getAppstoreAppsFast = function (repository, callback) {
|
||||
if (this._appstoreAppCache.length !== 0) return callback(null, this._appstoreAppCache);
|
||||
if (this._appstoreAppCache.length !== 0 && this._appstoreRepository === repository) return callback(null, this._appstoreAppCache);
|
||||
|
||||
repository = repository || 'core';
|
||||
|
||||
this.getAppstoreApps(repository, callback);
|
||||
this.getAppstoreApps(repository || 'core', callback);
|
||||
};
|
||||
|
||||
Client.prototype.getSubscription = function (callback) {
|
||||
|
||||
Reference in New Issue
Block a user