diff options
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/center_panel.jsx | 4 | ||||
-rw-r--r-- | web/react/components/create_post.jsx | 2 | ||||
-rw-r--r-- | web/react/components/posts_view_container.jsx | 2 | ||||
-rw-r--r-- | web/react/components/sidebar.jsx | 5 | ||||
-rw-r--r-- | web/react/utils/constants.jsx | 3 |
5 files changed, 9 insertions, 7 deletions
diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx index 242c2c637..ea0eec747 100644 --- a/web/react/components/center_panel.jsx +++ b/web/react/components/center_panel.jsx @@ -61,9 +61,7 @@ export default class CenterPanel extends React.Component { <div id='channel-header'> <ChannelHeader /> </div> - <div id='post-list'> - {postsContainer} - </div> + {postsContainer} <div className='post-create__container' id='post-create' diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index 1545cdfaa..4d1874e18 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -236,8 +236,6 @@ export default class CreatePost extends React.Component { PostStore.storeCurrentDraft(draft); } resizePostHolder() { - const height = this.state.windowHeight - $(ReactDOM.findDOMNode(this.refs.topDiv)).height() - 50; - $('.post-list-holder-by-time').css('height', `${height}px`); if (this.state.windowWidth > 960) { $('#post_textbox').focus(); } diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 301057990..761664602 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -261,7 +261,7 @@ export default class PostsViewContainer extends React.Component { } return ( - <div>{postListCtls}</div> + <div id='post-list'>{postListCtls}</div> ); } } diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index aab9919a4..8b5f7a381 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -20,6 +20,7 @@ const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const Preferences = Constants.Preferences; const TutorialSteps = Constants.TutorialSteps; +const NotificationPrefs = Constants.NotificationPrefs; const Tooltip = ReactBootstrap.Tooltip; const OverlayTrigger = ReactBootstrap.OverlayTrigger; @@ -76,6 +77,8 @@ export default class Sidebar extends React.Component { if (ch.type === 'D') { chMentionCount = chUnreadCount; chUnreadCount = 0; + } else if (chMember.notify_props && chMember.notify_props.mark_unread === NotificationPrefs.MENTION) { + chUnreadCount = 0; } channelUnreadCounts[ch.id] = {msgs: chUnreadCount, mentions: chMentionCount}; @@ -362,7 +365,7 @@ export default class Sidebar extends React.Component { var unread = false; if (channelMember) { msgCount = unreadCount.msgs + unreadCount.mentions; - unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0; + unread = msgCount > 0 || channelMember.mention_count > 0; } if (unread) { diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 7d885681a..58ee8e2d2 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -384,5 +384,8 @@ module.exports = { BOTTOM: 1, POST: 2, SIDEBAR_OPEN: 3 + }, + NotificationPrefs: { + MENTION: 'mention' } }; |