diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-02-12 14:02:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 14:02:24 +0100 |
commit | 8792128f38e19b0d7882468a4f1f9362b98793a0 (patch) | |
tree | 2689e394f9f88d05533e70ad0f6bcf622ee2fd5c /app/javascript/flavours/glitch/components | |
parent | a30a40c4379b26890b6453083ef213e672658902 (diff) | |
parent | 49eef466b8274ca5768deca3309af31bfbf81184 (diff) |
Merge pull request #1500 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r-- | app/javascript/flavours/glitch/components/dropdown_menu.js | 1 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/components/status_action_bar.js | 16 |
2 files changed, 9 insertions, 8 deletions
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.js b/app/javascript/flavours/glitch/components/dropdown_menu.js index d1aba691c..023fecb9a 100644 --- a/app/javascript/flavours/glitch/components/dropdown_menu.js +++ b/app/javascript/flavours/glitch/components/dropdown_menu.js @@ -177,7 +177,6 @@ export default class Dropdown extends React.PureComponent { disabled: PropTypes.bool, status: ImmutablePropTypes.map, isUserTouching: PropTypes.func, - isModalOpen: PropTypes.bool.isRequired, onOpen: PropTypes.func.isRequired, onClose: PropTypes.func.isRequired, dropdownPlacement: PropTypes.string, diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index 2ccb02c62..74bfd948e 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -193,9 +193,10 @@ class StatusActionBar extends ImmutablePureComponent { render () { const { status, intl, withDismiss, showReplyCount, directMessage, scrollKey } = this.props; - const mutingConversation = status.get('muted'); const anonymousAccess = !me; + const mutingConversation = status.get('muted'); const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); + const writtenByMe = status.getIn(['account', 'id']) === me; let menu = []; let reblogIcon = 'retweet'; @@ -211,16 +212,17 @@ class StatusActionBar extends ImmutablePureComponent { menu.push(null); - if (status.getIn(['account', 'id']) === me || withDismiss) { - menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick }); + if (writtenByMe && publicStatus) { + menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick }); menu.push(null); } - if (status.getIn(['account', 'id']) === me) { - if (publicStatus) { - menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick }); - } + if (writtenByMe || withDismiss) { + menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick }); + menu.push(null); + } + if (writtenByMe) { menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick }); menu.push({ text: intl.formatMessage(messages.redraft), action: this.handleRedraftClick }); } else { |