Browse Source

Set direction style to reply indicator (tootsuite pr #6006)

closed-social-glitch-2
cwm 6 years ago
parent
commit
20ad071931
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      app/javascript/flavours/glitch/features/compose/components/reply_indicator.js

+ 6
- 2
app/javascript/flavours/glitch/features/compose/components/reply_indicator.js View File

@ -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>
);
}

Loading…
Cancel
Save