From 25fdacd46a4dc5f5166607777bbbcfd3cea87a63 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Fri, 13 Nov 2015 11:59:15 +0500 Subject: UI changes for Direct messages and Bad connection --- web/react/components/more_direct_channels.jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/react/components') diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index 40deb37f2..d1265f67e 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -50,6 +50,10 @@ export default class MoreDirectChannels extends React.Component { handleFilterChange() { const filter = ReactDOM.findDOMNode(this.refs.filter).value; + if ($(window).width() > 768) { + $(ReactDOM.findDOMNode(this.refs.userList)).scrollTop(0); + } + if (filter !== this.state.filter) { this.setState({filter}); } -- cgit v1.2.3-1-g7c22 From 4ac553020515abb572e80e724ce76c6324c75d40 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Fri, 13 Nov 2015 11:02:00 -0500 Subject: Added null check when accessing post text --- web/react/components/post_attachment.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/post_attachment.jsx b/web/react/components/post_attachment.jsx index 2d6b47f03..cf65dfbfb 100644 --- a/web/react/components/post_attachment.jsx +++ b/web/react/components/post_attachment.jsx @@ -50,7 +50,8 @@ export default class PostAttachment extends React.Component { } shouldCollapse() { - return (this.props.attachment.text.match(/\n/g) || []).length >= 5 || this.props.attachment.text.length > 700; + const text = this.props.attachment.text || ''; + return (text.match(/\n/g) || []).length >= 5 || text.length > 700; } getCollapsedText() { @@ -292,4 +293,4 @@ export default class PostAttachment extends React.Component { PostAttachment.propTypes = { attachment: React.PropTypes.object.isRequired -}; \ No newline at end of file +}; -- cgit v1.2.3-1-g7c22