diff --git a/app/components/post/post.js b/app/components/post/post.js
index c0d9c6cad..908bddded 100644
--- a/app/components/post/post.js
+++ b/app/components/post/post.js
@@ -43,7 +43,7 @@ export default class Post extends Component {
if (this.props.onPress) {
this.props.onPress(this.props.post);
}
- }
+ };
renderCommentedOnMessage = (style) => {
if (!this.props.renderReplies || !this.props.commentedOnPost) {
@@ -100,7 +100,7 @@ export default class Post extends Component {
}
return ;
- }
+ };
renderFileAttachments() {
const {post} = this.props;
@@ -114,7 +114,23 @@ export default class Post extends Component {
viewUserProfile = () => {
this.props.actions.goToUserProfile(this.props.user.id);
- }
+ };
+
+ renderMessage = (style, messageStyle, replyBar = false) => {
+ return (
+
+
+ {replyBar && this.renderReplyBar(style)}
+ {this.props.post.message.length > 0 &&
+
+ {this.props.post.message}
+
+ }
+ {this.renderFileAttachments()}
+
+
+ );
+ };
render() {
const style = getStyleSheet(this.props.theme);
@@ -211,15 +227,7 @@ export default class Post extends Component {
{this.renderCommentedOnMessage(style)}
-
- {this.renderReplyBar(style)}
- {this.props.post.message.length > 0 &&
-
- {this.props.post.message}
-
- }
- {this.renderFileAttachments()}
-
+ {this.renderMessage(style, messageStyle, true)}
);
@@ -238,30 +246,16 @@ export default class Post extends Component {
-
- {this.props.post.message.length > 0 &&
-
- {this.props.post.message}
-
- }
- {this.renderFileAttachments()}
-
+ {this.renderMessage(style, messageStyle)}
);
}
- if (this.props.onPress) {
- return (
-
- {contents}
-
- );
- }
-
return contents;
}
+
}
const getStyleSheet = makeStyleSheetFromTheme((theme) => {
diff --git a/app/components/profile_picture/profile_picture.js b/app/components/profile_picture/profile_picture.js
index c070d2538..85398d787 100644
--- a/app/components/profile_picture/profile_picture.js
+++ b/app/components/profile_picture/profile_picture.js
@@ -11,38 +11,6 @@ import placeholder from 'assets/images/profile.jpg';
import Client from 'service/client';
-const getStyleSheet = makeStyleSheetFromTheme((theme) => {
- return StyleSheet.create({
- statusWrapper: {
- position: 'absolute',
- bottom: 0,
- right: 0,
- overflow: 'hidden',
- alignItems: 'center',
- justifyContent: 'center',
- borderColor: theme.centerChannelBg
- },
- statusContainer: {
- alignItems: 'center',
- justifyContent: 'center',
- overflow: 'hidden'
- },
- status: {
- color: theme.centerChannelBg
- },
- online: {
- backgroundColor: theme.onlineIndicator
- },
- away: {
- backgroundColor: theme.awayIndicator
- },
- offline: {
- backgroundColor: theme.centerChannelBg,
- borderColor: '#bababa'
- }
- });
-});
-
const statusToIcon = {
online: 'check',
away: 'minus'
@@ -134,3 +102,35 @@ export default class ProfilePicture extends React.PureComponent {
);
}
}
+
+const getStyleSheet = makeStyleSheetFromTheme((theme) => {
+ return StyleSheet.create({
+ statusWrapper: {
+ position: 'absolute',
+ bottom: 0,
+ right: 0,
+ overflow: 'hidden',
+ alignItems: 'center',
+ justifyContent: 'center',
+ borderColor: theme.centerChannelBg
+ },
+ statusContainer: {
+ alignItems: 'center',
+ justifyContent: 'center',
+ overflow: 'hidden'
+ },
+ status: {
+ color: theme.centerChannelBg
+ },
+ online: {
+ backgroundColor: theme.onlineIndicator
+ },
+ away: {
+ backgroundColor: theme.awayIndicator
+ },
+ offline: {
+ backgroundColor: theme.centerChannelBg,
+ borderColor: '#bababa'
+ }
+ });
+});
diff --git a/app/scenes/load_team/load_team.js b/app/scenes/load_team/load_team.js
index 4d97803c4..5570278db 100644
--- a/app/scenes/load_team/load_team.js
+++ b/app/scenes/load_team/load_team.js
@@ -1,9 +1,7 @@
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import React, {PropTypes, PureComponent} from 'react';
-
-import Loading from 'app/components/loading';
+import {PropTypes, PureComponent} from 'react';
import {RequestStatus} from 'service/constants';
@@ -57,6 +55,6 @@ export default class LoadTeam extends PureComponent {
}
render() {
- return ;
+ return null;
}
}