From 13999840c56e12e708432ee560ee83fe7c9ff361 Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 16 Feb 2025 22:18:57 +0000 Subject: fix a freaky bug with note deletion and home timeline --- templates/note.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/note.php b/templates/note.php index 19a1895..6835a0f 100644 --- a/templates/note.php +++ b/templates/note.php @@ -5,7 +5,7 @@ use Digitigrade\Model\NotePrivacyScope; use Digitigrade\Model\UserAccount; use Digitigrade\UserSettings; -const MAX_PREVIEW_CARDS = 1; +$MAX_PREVIEW_CARDS = 1; $user = UserAccount::findByCurrentSession(); $prefs = $user ? new UserSettings($user) : null; @@ -95,7 +95,7 @@ $pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id; $i = 0; foreach ($note->getLinkPreviews() as $preview) { call_template("note_link_preview", ['preview' => $preview]); - if (++$i > MAX_PREVIEW_CARDS) + if (++$i > $MAX_PREVIEW_CARDS) break; } ?> -- cgit v1.3