diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-07-24 20:01:30 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-07-25 11:57:09 +0200 |
commit | 18346f40443f1c01b45d94be1b0edce20b2c27be (patch) | |
tree | b78b33927842f5dfd374fa5fb9509a809849e358 /app/javascript/flavours/glitch/features/direct_timeline/components | |
parent | eacde1a130a5764686a284d610890ba0f60b193e (diff) |
Add option to share CW toggle state across instances of a post
Diffstat (limited to 'app/javascript/flavours/glitch/features/direct_timeline/components')
-rw-r--r-- | app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js index 202d96676..7107c9db3 100644 --- a/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js +++ b/app/javascript/flavours/glitch/features/direct_timeline/components/conversation.js @@ -132,6 +132,8 @@ class Conversation extends ImmutablePureComponent { } handleShowMore = () => { + this.props.onToggleHidden(this.props.lastStatus); + if (this.props.lastStatus.get('spoiler_text')) { this.setExpansion(!this.state.isExpanded); } @@ -143,12 +145,13 @@ class Conversation extends ImmutablePureComponent { render () { const { accounts, lastStatus, unread, scrollKey, intl } = this.props; - const { isExpanded } = this.state; if (lastStatus === null) { return null; } + const isExpanded = this.props.settings.getIn(['content_warnings', 'shared_state']) ? !lastStatus.get('hidden') : this.state.isExpanded; + const menu = [ { text: intl.formatMessage(messages.open), action: this.handleClick }, null, |