summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/posts_view_container.jsx5
-rw-r--r--web/react/components/rhs_root_post.jsx4
-rw-r--r--web/react/components/search_autocomplete.jsx15
3 files changed, 16 insertions, 8 deletions
diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx
index 761664602..6cdf69402 100644
--- a/web/react/components/posts_view_container.jsx
+++ b/web/react/components/posts_view_container.jsx
@@ -85,11 +85,6 @@ export default class PostsViewContainer extends React.Component {
const channels = this.state.channels.slice();
const channelId = ChannelStore.getCurrentId();
- // Has the channel really changed?
- if (channelId === channels[this.state.currentChannelIndex]) {
- return;
- }
-
PostStore.clearUnseenDeletedPosts(channelId);
let lastViewed = Number.MAX_VALUE;
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));