From 89e8bdf77b1054ad1019f03d606ff19612bba751 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 4 Aug 2024 18:06:26 +0800 Subject: [PATCH] Use pinned instead of _pinned --- src/components/status.jsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index c42e374c..555f86b7 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -283,6 +283,7 @@ function Status({ url, emojis, tags, + pinned, // Non-API props _deleted, _pinned, @@ -1122,22 +1123,20 @@ function Status({ try { const newStatus = await masto.v1.statuses .$select(id) - [_pinned ? 'unpin' : 'pin'](); - // saveStatus(newStatus, instance); + [pinned ? 'unpin' : 'pin'](); + saveStatus(newStatus, instance); showToast( - _pinned + pinned ? 'Post unpinned from profile' : 'Post pinned to profile', ); } catch (e) { console.error(e); - showToast( - _pinned ? 'Unable to unpin post' : 'Unable to pin post', - ); + showToast(pinned ? 'Unable to unpin post' : 'Unable to pin post'); } }} > - {_pinned ? ( + {pinned ? ( <> Unpin from profile