From 658dac34f16b13d365eacf5fc79f54efeb182f31 Mon Sep 17 00:00:00 2001 From: Tomas Dittmann Date: Thu, 12 Oct 2023 16:09:24 +0200 Subject: [PATCH] use comment order --- Controller/CheckboxController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Controller/CheckboxController.php b/Controller/CheckboxController.php index 00b2d03..1c53e05 100644 --- a/Controller/CheckboxController.php +++ b/Controller/CheckboxController.php @@ -3,6 +3,7 @@ namespace Kanboard\Plugin\MarkdownPlus\Controller; use Kanboard\Controller\BaseController; +use Kanboard\Model\UserMetadataModel; class CheckboxController extends BaseController { @@ -83,7 +84,9 @@ public function toggle() } } - foreach ($this->commentModel->getAll($taskId) as $comment) { + $commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC'); + + foreach ($this->commentModel->getAll($taskId, $commentSortingDirection) as $comment) { $text = $comment['comment']; $result = $this->findCheckBox($text, $number, $foundCheckboxes);