diff options
Diffstat (limited to 'templates/note/note.php')
| -rw-r--r-- | templates/note/note.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/templates/note/note.php b/templates/note/note.php index 94f4895..ddc2bac 100644 --- a/templates/note/note.php +++ b/templates/note/note.php @@ -11,7 +11,6 @@ $MAX_PREVIEW_CARDS = 1; $user = UserAccount::findByCurrentSession(); $prefs = $user ? new UserSettings($user) : null; $interKinds = []; -$actionsDisabled = $user == null; if ($user != null) { $interactions = $note->getInteractionsWithAuthor($user->actor); $interKinds = array_map(fn($inter) => $inter->kind, $interactions); @@ -98,18 +97,18 @@ if ($user != null) { <div class="buttons"> <?php foreach (['like', 'dislike', 'reshare'] as $action) { $kind = InteractionKind::from($action); - call_template('interaction_button', [ + call_template('note/interaction_button', [ 'action' => $action, 'note' => $note, 'active' => in_array($kind, $interKinds), 'count' => $note->countInteractionsOfKind($kind), - 'disabled' => $actionsDisabled + 'disabled' => !$note->isInteractibleBy($action, $user) ]); } call_template('note/reply_button', [ 'note' => $note, 'count' => $note->countReplies(), - 'disabled' => $actionsDisabled + 'disabled' => !$note->isInteractibleBy('reply', $user) ]); ?> <div class="right"> |
