diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 7da7a5bf..f0a145e7 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -369,7 +369,6 @@ export default { ${relationClause(type)} ${joinZapRankPersonalView(me, models)} ${whereClause( - '"Item"."pinId" IS NULL', '"Item"."deletedAt" IS NULL', subClause(sub, 5, subClauseTable(type), me), typeClause(type), @@ -389,7 +388,6 @@ export default { ${selectClause(type)} ${relationClause(type)} ${whereClause( - '"Item"."pinId" IS NULL', '"Item"."deletedAt" IS NULL', subClause(sub, 5, subClauseTable(type), me), typeClause(type), diff --git a/components/item-info.js b/components/item-info.js index 62e3e386..477a08da 100644 --- a/components/item-info.js +++ b/components/item-info.js @@ -25,7 +25,7 @@ import { MuteSubDropdownItem, PinSubDropdownItem } from './territory-header' export default function ItemInfo ({ item, full, commentsText = 'comments', commentTextSingular = 'comment', className, embellishUser, extraInfo, onEdit, editText, - onQuoteReply, nofollow, extraBadges, nested + onQuoteReply, nofollow, extraBadges, nested, pinnable }) { const editThreshold = new Date(item.createdAt).getTime() + 10 * 60000 const me = useMe() @@ -57,7 +57,7 @@ export default function ItemInfo ({ return (
- {!item.position && !(!item.parentId && Number(item.user?.id) === AD_USER_ID) && + {!(item.position && (pinnable || !item.subName)) && !(!item.parentId && Number(item.user?.id) === AD_USER_ID) && <> ) :
}
- {item.position + {item.position && (pinnable || !item.subName) ? : item.meDontLikeSats > item.meSats ? @@ -95,6 +95,7 @@ export default function Item ({ item, rank, belowTitle, right, full, children, s full={full} item={item} onQuoteReply={onQuoteReply} nofollow={nofollow} + pinnable={pinnable} extraBadges={Number(item?.user?.id) === AD_USER_ID && AD} /> {belowTitle} diff --git a/components/items.js b/components/items.js index 9931ebb2..d1d4e82c 100644 --- a/components/items.js +++ b/components/items.js @@ -49,7 +49,7 @@ export default function Items ({ ssrData, variables = {}, query, destructureData <>
{itemsWithPins.filter(filter).map((item, i) => ( - + 0} /> ))}