sforkowany z mirror/soapbox
Hide action bar if status is under review
rodzic
5f83ba9324
commit
1390d155b8
|
@ -392,7 +392,7 @@ const Status: React.FC<IStatus> = (props) => {
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
{!hideActionBar && (
|
{(!hideActionBar && !isUnderReview) && (
|
||||||
<div className='pt-4'>
|
<div className='pt-4'>
|
||||||
<StatusActionBar status={actualStatus} withDismiss={withDismiss} />
|
<StatusActionBar status={actualStatus} withDismiss={withDismiss} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -134,6 +134,7 @@ const Thread: React.FC<IThread> = (props) => {
|
||||||
const me = useAppSelector(state => state.me);
|
const me = useAppSelector(state => state.me);
|
||||||
const status = useAppSelector(state => getStatus(state, { id: props.params.statusId }));
|
const status = useAppSelector(state => getStatus(state, { id: props.params.statusId }));
|
||||||
const displayMedia = settings.get('displayMedia') as DisplayMedia;
|
const displayMedia = settings.get('displayMedia') as DisplayMedia;
|
||||||
|
const isUnderReview = status?.visibility === 'self';
|
||||||
|
|
||||||
const { ancestorsIds, descendantsIds } = useAppSelector(state => {
|
const { ancestorsIds, descendantsIds } = useAppSelector(state => {
|
||||||
let ancestorsIds = ImmutableOrderedSet<string>();
|
let ancestorsIds = ImmutableOrderedSet<string>();
|
||||||
|
@ -412,7 +413,7 @@ const Thread: React.FC<IThread> = (props) => {
|
||||||
if (next && status) {
|
if (next && status) {
|
||||||
dispatch(fetchNext(status.id, next)).then(({ next }) => {
|
dispatch(fetchNext(status.id, next)).then(({ next }) => {
|
||||||
setNext(next);
|
setNext(next);
|
||||||
}).catch(() => {});
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
}, 300, { leading: true }), [next, status]);
|
}, 300, { leading: true }), [next, status]);
|
||||||
|
|
||||||
|
@ -475,14 +476,18 @@ const Thread: React.FC<IThread> = (props) => {
|
||||||
onOpenCompareHistoryModal={handleOpenCompareHistoryModal}
|
onOpenCompareHistoryModal={handleOpenCompareHistoryModal}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<hr className='mb-2 border-t-2 dark:border-primary-800' />
|
{!isUnderReview ? (
|
||||||
|
<>
|
||||||
|
<hr className='mb-2 border-t-2 dark:border-primary-800' />
|
||||||
|
|
||||||
<StatusActionBar
|
<StatusActionBar
|
||||||
status={status}
|
status={status}
|
||||||
expandable={false}
|
expandable={false}
|
||||||
space='expand'
|
space='expand'
|
||||||
withLabels
|
withLabels
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</HotKeys>
|
</HotKeys>
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue