diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2017-12-26 17:03:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 17:03:29 -0500 |
commit | 7347bc733418651216f22f224caf656471499a08 (patch) | |
tree | ae9b93b06d6955258f5159dc4285e7ba2253b6f2 /app/javascript/flavours/glitch/features/compose/components/reply_indicator.js | |
parent | e6ab869d956eb088eff6ce8b8b6114fb0d6d63fd (diff) | |
parent | 20ad071931ef520cdae6bf683ee52d369de8314b (diff) |
Merge pull request #286 from chriswmartin/merge-vanilla-updates-into-glitch
Merge various small vanilla updates into glitch
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components/reply_indicator.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/reply_indicator.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js b/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js index cb28e51be..3048d591b 100644 --- a/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js +++ b/app/javascript/flavours/glitch/features/compose/components/reply_indicator.js @@ -6,6 +6,7 @@ import IconButton from 'flavours/glitch/components/icon_button'; import DisplayName from 'flavours/glitch/components/display_name'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import { isRtl } from 'flavours/glitch/util/rtl'; const messages = defineMessages({ cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' }, @@ -42,7 +43,10 @@ export default class ReplyIndicator extends ImmutablePureComponent { return null; } - const content = { __html: status.get('contentHtml') }; + const content = { __html: status.get('contentHtml') }; + const style = { + direction: isRtl(status.get('search_index')) ? 'rtl' : 'ltr', + }; return ( <div className='reply-indicator'> @@ -55,7 +59,7 @@ export default class ReplyIndicator extends ImmutablePureComponent { </a> </div> - <div className='reply-indicator__content' dangerouslySetInnerHTML={content} /> + <div className='reply-indicator__content' style={style} dangerouslySetInnerHTML={content} /> </div> ); } |