From c298fa4d4cc4277c1f7c2a54d9fb98b395b9bc12 Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 13 Jan 2025 21:12:22 +0000 Subject: tidy stylesheets and improve replies styling --- Digitigrade/Model/Note.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Digitigrade/Model') diff --git a/Digitigrade/Model/Note.php b/Digitigrade/Model/Note.php index 277b503..a4891a3 100644 --- a/Digitigrade/Model/Note.php +++ b/Digitigrade/Model/Note.php @@ -112,6 +112,8 @@ class Note extends PushableModel implements TimelineIncludeable { } public static function findAllInThread(Note $threadApex, ?int $limit = null, int $offset = 0): array { + if (isset($limit)) + $limit--; // to account for adding the note afterwards $notes = self::findAllWhere('thread_apex = ? AND deleted = false', [$threadApex->id], $limit, $offset, 'created ASC'); array_splice($notes, 0, 0, [$threadApex]); // since the apex itself has threadApex = null return $notes; -- cgit v1.3