Merge pull request #7506 from nextcloud/fix-app-cache
Use cached app list
This commit is contained in:
commit
1f108970c4
|
@ -396,10 +396,10 @@ class Installer {
|
|||
}
|
||||
|
||||
if ($this->apps === null) {
|
||||
$apps = $this->appFetcher->get();
|
||||
$this->apps = $this->appFetcher->get();
|
||||
}
|
||||
|
||||
foreach($apps as $app) {
|
||||
foreach($this->apps as $app) {
|
||||
if($app['id'] === $appId) {
|
||||
$currentVersion = OC_App::getAppVersion($appId);
|
||||
$newestVersion = $app['releases'][0]['version'];
|
||||
|
|
|
@ -156,6 +156,7 @@ class InstallerTest extends TestCase {
|
|||
|
||||
$installer = $this->getInstaller();
|
||||
$this->assertSame($updateAvailable, $installer->isUpdateAvailable('files'));
|
||||
$this->assertSame($updateAvailable, $installer->isUpdateAvailable('files'), 'Cached result should be returned and fetcher should be only called once');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue