From c4bac576aef51c89ccb689a6483bf652da7c498c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 9 Feb 2023 11:45:17 +0100 Subject: [PATCH] feat(app-hints): Avoid sending app hints if the appstore is disabled This will prevent app hints to be sent if the appstore is currently disabled. It will send them if the setting has changed Signed-off-by: Thomas Citharel --- lib/Listener/BeforeTemplateRenderedListener.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Listener/BeforeTemplateRenderedListener.php b/lib/Listener/BeforeTemplateRenderedListener.php index fd7c50baf..a9e0b8146 100644 --- a/lib/Listener/BeforeTemplateRenderedListener.php +++ b/lib/Listener/BeforeTemplateRenderedListener.php @@ -82,7 +82,10 @@ public function handle(Event $event): void { $this->jobList->add('OCA\FirstRunWizard\Notification\BackgroundJob', ['uid' => $this->userSession->getUser()->getUID()]); } - $this->appHint->sendAppHintNotifications(); + + if ($this->config->getSystemValueBool('appstoreenabled', true)) { + $this->appHint->sendAppHintNotifications(); + } Util::addScript(Application::APP_ID, 'about'); }