Remove deprecated method
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

Fix the follow error:

```
Message: Call to undefined method OC_App::getNavigation() in file '/var/www/html/apps-extra/side_menu/lib/Service/AppRepository.php' line 54
```

Reference: 167763d312

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos 2023-07-10 15:14:42 -03:00
parent 0ea5a579a6
commit 04af12691c
Signed by untrusted user: vitormattos
GPG key ID: B7AB4B76A7CA7318

View file

@ -3,6 +3,7 @@
namespace OCA\SideMenu\Service;
use OC\User\User;
use OCP\INavigationManager;
use OCP\L10N\IFactory;
/**
@ -34,6 +35,7 @@ class AppRepository
public function __construct(
\OC_App $ocApp,
protected INavigationManager $navigationManager,
IFactory $l10nFactory,
ConfigProxy $config,
CategoryRepository $categoryRepository
@ -51,7 +53,7 @@ class AppRepository
*/
public function getVisibleApps()
{
$navigation = $this->ocApp->getNavigation();
$navigation = $this->navigationManager->getAll();
$appCategoriesCustom = $this->config->getAppValueArray('apps-categories-custom', '[]');
$categories = $this->categoryRepository->getOrderedCategories();
$apps = $this->ocApp->listAllApps();