Make the appstore filter toolbar work with repositories

This commit is contained in:
Johannes Zellner
2022-11-09 15:45:34 +01:00
parent 7f37de0dd1
commit 997c596251
4 changed files with 45 additions and 39 deletions
+5 -6
View File
@@ -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) {