1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-30 15:58:28 +09:00

Disable reactions in detailed status view when visibleReactions is 0

This commit is contained in:
Essem 2024-06-16 14:30:22 -05:00
parent ed68485e5c
commit 0fb3dcf085
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C

View File

@ -30,6 +30,7 @@ import { DisplayName } from '../../../components/display_name';
import MediaGallery from '../../../components/media_gallery';
import StatusContent from '../../../components/status_content';
import StatusReactions from '../../../components/status_reactions';
import { visibleReactions } from '../../../initial_state';
import Audio from '../../audio';
import scheduleIdleTask from '../../ui/util/schedule_idle_task';
import Video from '../../video';
@ -410,13 +411,15 @@ export const DetailedStatus: React.FC<{
{...(statusContentProps as any)}
/>
<StatusReactions
statusId={status.get('id')}
reactions={status.get('reactions')}
addReaction={onReactionAdd}
removeReaction={onReactionRemove}
canReact={signedIn}
/>
{visibleReactions && visibleReactions > 0 && (
<StatusReactions
statusId={status.get('id')}
reactions={status.get('reactions')}
addReaction={onReactionAdd}
removeReaction={onReactionRemove}
canReact={signedIn}
/>
)}
<div className='detailed-status__meta'>
<div className='detailed-status__meta__line'>