diff options
author | Mélanie Chauvel <perso@hack-libre.org> | 2021-02-11 01:05:04 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-02-12 10:55:37 +0100 |
commit | 0e7484209cf7633bacaed28172d718b3b5a27392 (patch) | |
tree | 853277bd7b918dc57f89d1deb36b0b13d4ac05c7 /app/javascript/flavours/glitch/features/status/components | |
parent | 28f533f37036d27d0e420cbcf24684fd5faadc17 (diff) |
[Glitch] Slightly reorder three dots menu on toots to make it more intuitive
Port f5fefdc11aee24626d78480766fda878911f58b7 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/status/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/action_bar.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/action_bar.js b/app/javascript/flavours/glitch/features/status/components/action_bar.js index 0f16d93fe..6ed5f3865 100644 --- a/app/javascript/flavours/glitch/features/status/components/action_bar.js +++ b/app/javascript/flavours/glitch/features/status/components/action_bar.js @@ -145,8 +145,9 @@ class ActionBar extends React.PureComponent { render () { const { status, intl } = this.props; - const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); + const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); const mutingConversation = status.get('muted'); + const writtenByMe = status.getIn(['account', 'id']) === me; let menu = []; @@ -156,12 +157,12 @@ class ActionBar extends React.PureComponent { menu.push(null); } - if (me === status.getIn(['account', 'id'])) { + if (writtenByMe) { if (publicStatus) { menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick }); + menu.push(null); } - menu.push(null); menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick }); menu.push(null); menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick }); |