diff options
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/posts_view_container.jsx | 2 | ||||
-rw-r--r-- | web/react/components/rhs_root_post.jsx | 4 | ||||
-rw-r--r-- | web/react/components/search_autocomplete.jsx | 15 |
3 files changed, 18 insertions, 3 deletions
diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 761664602..5059747bd 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -87,6 +87,8 @@ export default class PostsViewContainer extends React.Component { // Has the channel really changed? if (channelId === channels[this.state.currentChannelIndex]) { + // Dirty hack + this.forceUpdate(); return; } diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx index 21e52b438..e3b023841 100644 --- a/web/react/components/rhs_root_post.jsx +++ b/web/react/components/rhs_root_post.jsx @@ -9,6 +9,7 @@ var utils = require('../utils/utils.jsx'); var FileAttachmentList = require('./file_attachment_list.jsx'); var twemoji = require('twemoji'); var Constants = require('../utils/constants.jsx'); +const PostBodyAdditionalContent = require('./post_body_additional_content.jsx'); export default class RhsRootPost extends React.Component { constructor(props) { @@ -180,6 +181,9 @@ export default class RhsRootPost extends React.Component { onClick={TextFormatting.handleClick} dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}} /> + <PostBodyAdditionalContent + post={post} + /> {fileAttachment} </div> </div> diff --git a/web/react/components/search_autocomplete.jsx b/web/react/components/search_autocomplete.jsx index 736919697..d245c6bac 100644 --- a/web/react/components/search_autocomplete.jsx +++ b/web/react/components/search_autocomplete.jsx @@ -189,7 +189,16 @@ export default class SearchAutocomplete extends React.Component { channels = channels.filter((channel) => channel.type !== 'D'); } - channels.sort((a, b) => a.name.localeCompare(b.name)); + channels.sort((a, b) => { + // put public channels first and then sort alphabebetically + if (a.type === b.type) { + return a.name.localeCompare(b.name); + } else if (a.type === Constants.OPEN_CHANNEL) { + return -1; + } + + return 1; + }); suggestions = channels; } else if (mode === 'users') { @@ -289,7 +298,7 @@ export default class SearchAutocomplete extends React.Component { key='public-channel-divider' className='search-autocomplete__divider' > - {'Public ' + Utils.getChannelTerm(Constants.OPEN_CHANNEL) + 's'} + <span>{'Public ' + Utils.getChannelTerm(Constants.OPEN_CHANNEL) + 's'}</span> </div> ); suggestions = suggestions.concat(publicChannels.map(this.renderChannelSuggestion)); @@ -302,7 +311,7 @@ export default class SearchAutocomplete extends React.Component { key='private-channel-divider' className='search-autocomplete__divider' > - {'Private ' + Utils.getChannelTerm(Constants.PRIVATE_CHANNEL) + 's'} + <span>{'Private ' + Utils.getChannelTerm(Constants.PRIVATE_CHANNEL) + 's'}</span> </div> ); suggestions = suggestions.concat(privateChannels.map(this.renderChannelSuggestion)); |