mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-11 14:30:35 +00:00
[Glitch] Ensure quote policy is displayed as “Just me” when disabled because of visibility
Port 7a76f71d99 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -239,6 +239,7 @@ export function submitCompose(overridePrivacy = null, successCallback = undefine
|
||||
});
|
||||
}
|
||||
|
||||
const visibility = overridePrivacy || getState().getIn(['compose', 'privacy']);
|
||||
api().request({
|
||||
url: statusId === null ? '/api/v1/statuses' : `/api/v1/statuses/${statusId}`,
|
||||
method: statusId === null ? 'post' : 'put',
|
||||
@@ -250,11 +251,11 @@ export function submitCompose(overridePrivacy = null, successCallback = undefine
|
||||
media_attributes,
|
||||
sensitive: getState().getIn(['compose', 'sensitive']) || (spoilerText.length > 0 && media.size !== 0),
|
||||
spoiler_text: spoilerText,
|
||||
visibility: overridePrivacy || getState().getIn(['compose', 'privacy']),
|
||||
visibility: visibility,
|
||||
poll: getState().getIn(['compose', 'poll'], null),
|
||||
language: getState().getIn(['compose', 'language']),
|
||||
quoted_status_id: getState().getIn(['compose', 'quoted_status_id']),
|
||||
quote_approval_policy: getState().getIn(['compose', 'quote_policy']),
|
||||
quote_approval_policy: visibility === 'private' || visibility === 'direct' ? 'nobody' : getState().getIn(['compose', 'quote_policy']),
|
||||
},
|
||||
headers: {
|
||||
'Idempotency-Key': getState().getIn(['compose', 'idempotencyKey']),
|
||||
|
||||
@@ -253,7 +253,7 @@ export const VisibilityModal: FC<VisibilityModalProps> = forwardRef(
|
||||
items={quoteItems}
|
||||
onChange={handleQuotePolicyChange}
|
||||
classPrefix='visibility-dropdown'
|
||||
current={quotePolicy}
|
||||
current={disableQuotePolicy ? 'nobody' : quotePolicy}
|
||||
title={intl.formatMessage(messages.buttonTitle)}
|
||||
disabled={disableQuotePolicy}
|
||||
id={quoteDropdownId}
|
||||
|
||||
Reference in New Issue
Block a user