Fix: ブースト時に選択できる公開範囲に限定投稿が含まれる問題 (LTS) (#461)
This commit is contained in:
parent
33f254be42
commit
49d561178d
2 changed files with 6 additions and 0 deletions
|
@ -156,6 +156,7 @@ class PrivacyDropdown extends PureComponent {
|
|||
value: PropTypes.string.isRequired,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
noDirect: PropTypes.bool,
|
||||
noLimited: PropTypes.bool,
|
||||
container: PropTypes.func,
|
||||
disabled: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
|
@ -249,6 +250,10 @@ class PrivacyDropdown extends PureComponent {
|
|||
if (this.props.noDirect) {
|
||||
this.selectableOptions = this.selectableOptions.filter((opt) => opt.value !== 'direct');
|
||||
}
|
||||
|
||||
if (this.props.noLimited) {
|
||||
this.selectableOptions = this.selectableOptions.filter((opt) => !['mutual', 'circle'].includes(opt.value));
|
||||
}
|
||||
}
|
||||
|
||||
setTargetRef = c => {
|
||||
|
|
|
@ -140,6 +140,7 @@ class BoostModal extends ImmutablePureComponent {
|
|||
{status.get('visibility_ex') !== 'private' && !status.get('reblogged') && (
|
||||
<PrivacyDropdown
|
||||
noDirect
|
||||
noLimited
|
||||
value={privacy}
|
||||
container={this._findContainer}
|
||||
onChange={this.props.onChangeBoostPrivacy}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue