aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model
diff options
context:
space:
mode:
authorwinter2025-01-13 21:12:22 +0000
committerwinter2025-01-13 21:12:22 +0000
commitc298fa4d4cc4277c1f7c2a54d9fb98b395b9bc12 (patch)
tree4037c3bfc88a585085a3db5c0c8455fad702eff5 /Digitigrade/Model
parent5e5b7c5d6d4bbdd4acaea7d4b6c5be1e27b04a86 (diff)
tidy stylesheets and improve replies styling
Diffstat (limited to 'Digitigrade/Model')
-rw-r--r--Digitigrade/Model/Note.php2
1 files changed, 2 insertions, 0 deletions
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;