show sats on full view pinned comments (#2071)
* show sats on full view pinned comments; simplify conditions; pass topLevel as full status for comments * comment view: show Pin instead of Boost also for own items --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
This commit is contained in:
parent
719cb2d507
commit
22e4f8acf5
@ -165,11 +165,13 @@ export default function Comment ({
|
||||
<div className={`${itemStyles.item} ${styles.item}`}>
|
||||
{item.outlawed && !me?.privates?.wildWestMode
|
||||
? <Skull className={styles.dontLike} width={24} height={24} />
|
||||
: pin
|
||||
? <Pin width={22} height={22} className={styles.pin} />
|
||||
: item.mine
|
||||
? <Boost item={item} className={styles.upvote} />
|
||||
: item.meDontLikeSats > item.meSats
|
||||
? <DownZap width={24} height={24} className={styles.dontLike} item={item} />
|
||||
: pin ? <Pin width={22} height={22} className={styles.pin} /> : <UpVote item={item} className={styles.upvote} collapsed={collapse === 'yep'} />}
|
||||
: <UpVote item={item} className={styles.upvote} collapsed={collapse === 'yep'} />}
|
||||
<div className={`${itemStyles.hunk} ${styles.hunk}`}>
|
||||
<div className='d-flex align-items-center'>
|
||||
{item.user?.meMute && !includeParent && collapse === 'yep'
|
||||
@ -182,6 +184,7 @@ export default function Comment ({
|
||||
>reply from someone you muted
|
||||
</span>)
|
||||
: <ItemInfo
|
||||
full={topLevel}
|
||||
item={item}
|
||||
commentsText='replies'
|
||||
commentTextSingular='reply'
|
||||
|
@ -89,11 +89,14 @@ export default function ItemInfo ({
|
||||
const myPost = (me && root && Number(me.id) === Number(root.user.id))
|
||||
const rootReply = item.path.split('.').length === 2
|
||||
const canPin = (isPost && mySub) || (myPost && rootReply)
|
||||
const isPinnedPost = isPost && item.position && (pinnable || !item.subName)
|
||||
const isPinnedSubReply = !isPost && item.position && !item.subName
|
||||
const isAd = !item.parentId && Number(item.user?.id) === USER_ID.ad
|
||||
const meSats = (me ? item.meSats : item.meAnonSats) || 0
|
||||
|
||||
return (
|
||||
<div className={className || `${styles.other}`}>
|
||||
{!(item.position && (pinnable || !item.subName)) && !(!item.parentId && Number(item.user?.id) === USER_ID.ad) &&
|
||||
{!isPinnedPost && !(isPinnedSubReply && !full) && !isAd &&
|
||||
<>
|
||||
<span title={itemTitle(item)}>
|
||||
{numWithUnits(item.sats)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user