Skip to content

Commit

Permalink
Fix: ブースト時に選択できる公開範囲に限定投稿が含まれる問題 (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode authored Jan 15, 2024
1 parent aefe147 commit e087286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class PrivacyDropdown extends PureComponent {
value: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
noDirect: PropTypes.bool,
noLimited: PropTypes.bool,
replyToLimited: PropTypes.bool,
container: PropTypes.func,
disabled: PropTypes.bool,
Expand Down Expand Up @@ -260,6 +261,10 @@ class PrivacyDropdown extends PureComponent {
);
}

if (this.props.noLimited) {
this.options = this.options.filter((opt) => !['mutual', 'circle'].includes(opt.value));
}

this.selectableOptions = [...this.options];

if (!enableLoginPrivacy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class BoostModal extends ImmutablePureComponent {
{status.get('visibility') !== 'private' && !status.get('reblogged') && (
<PrivacyDropdown
noDirect
noLimited
value={privacy}
container={this._findContainer}
onChange={this.props.onChangeBoostPrivacy}
Expand Down

0 comments on commit e087286

Please sign in to comment.