From ea8b7999f76b7569b4f9e6766e74b160bcb1db32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 15 Feb 2023 10:02:03 +0100 Subject: [PATCH] perf: No need to fetch boards every middleware call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/DefaultBoardService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Service/DefaultBoardService.php b/lib/Service/DefaultBoardService.php index a9f31d0ac..5698994d6 100644 --- a/lib/Service/DefaultBoardService.php +++ b/lib/Service/DefaultBoardService.php @@ -62,9 +62,8 @@ class DefaultBoardService { */ public function checkFirstRun($userId): bool { $firstRun = $this->config->getUserValue($userId, Application::APP_ID, 'firstRun', 'yes'); - $userBoards = $this->boardMapper->findAllByUser($userId); - if ($firstRun === 'yes' && count($userBoards) === 0) { + if ($firstRun === 'yes') { try { $this->config->setUserValue($userId, Application::APP_ID, 'firstRun', 'no'); } catch (PreConditionNotMetException $e) {