From 4b9ff0ca5b137e72008d17a8d3f78b32db88a11c Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 11 Jan 2024 10:44:24 +0800 Subject: [PATCH] Hide "more" icon for posts in notifications --- src/components/notification.jsx | 21 ++++++++++++++++++--- src/components/status.jsx | 6 ++++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/notification.jsx b/src/components/notification.jsx index e5722061..20e53045 100644 --- a/src/components/notification.jsx +++ b/src/components/notification.jsx @@ -292,7 +292,12 @@ function Notification({ instance ? `/${instance}/s/${status.id}` : `/s/${status.id}` } > - + ))} @@ -326,9 +331,19 @@ function Notification({ } > {isStatic ? ( - + ) : ( - + )} )} diff --git a/src/components/status.jsx b/src/components/status.jsx index 29914e0c..b2fb421a 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -124,6 +124,7 @@ function Status({ quoted, onStatusLinkClick = () => {}, showFollowedTags, + allowContextMenu, }) { if (skeleton) { return ( @@ -987,7 +988,8 @@ function Status({ const [isContextMenuOpen, setIsContextMenuOpen] = useState(false); const [contextMenuProps, setContextMenuProps] = useState({}); - const showContextMenu = !isSizeLarge && !previewMode && !_deleted && !quoted; + const showContextMenu = + allowContextMenu || (!isSizeLarge && !previewMode && !_deleted && !quoted); // Only iOS/iPadOS browsers don't support contextmenu // Some comments report iPadOS might support contextmenu if a mouse is connected @@ -1412,7 +1414,7 @@ function Status({ /> )}{' '} - {showContextMenu && } + {!previewMode && } ) : ( //