Mark flagged posts for consecutive messages (#1913)
This commit is contained in:
parent
199a49b221
commit
145520f676
1 changed files with 27 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import {
|
|||
import {intlShape} from 'react-intl';
|
||||
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
|
||||
|
||||
import FlagIcon from 'app/components/flag_icon';
|
||||
import PostBody from 'app/components/post_body';
|
||||
import PostHeader from 'app/components/post_header';
|
||||
import PostProfilePicture from 'app/components/post_profile_picture';
|
||||
|
|
@ -419,9 +420,26 @@ export default class Post extends PureComponent {
|
|||
|
||||
let postHeader;
|
||||
let userProfile;
|
||||
let consecutiveStyle;
|
||||
|
||||
if (mergeMessage) {
|
||||
userProfile = <View style={style.consecutivePostContainer}/>;
|
||||
consecutiveStyle = {paddingBottom: 5};
|
||||
|
||||
if (isFlagged) {
|
||||
userProfile = (
|
||||
<View style={style.consecutivePostContainer}>
|
||||
<View style={style.consecutivePostWithFlag}>
|
||||
<FlagIcon
|
||||
height={11}
|
||||
width={11}
|
||||
color={theme.linkColor}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
userProfile = <View style={style.consecutivePostContainer}/>;
|
||||
}
|
||||
} else {
|
||||
userProfile = (
|
||||
<TouchableHighlight
|
||||
|
|
@ -456,7 +474,7 @@ export default class Post extends PureComponent {
|
|||
}
|
||||
|
||||
return (
|
||||
<View style={[style.container, this.props.style, highlighted, selected]}>
|
||||
<View style={[style.container, this.props.style, consecutiveStyle, highlighted, selected]}>
|
||||
{userProfile}
|
||||
<View style={style.messageContainerWithReplyBar}>
|
||||
{!commentedOnPost && this.renderReplyBar()}
|
||||
|
|
@ -522,6 +540,13 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
|||
marginLeft: 46,
|
||||
marginTop: 10,
|
||||
},
|
||||
consecutivePostWithFlag: {
|
||||
width: 11,
|
||||
height: 11,
|
||||
position: 'absolute',
|
||||
top: -6,
|
||||
left: -11,
|
||||
},
|
||||
profilePictureContainer: {
|
||||
marginBottom: 10,
|
||||
marginRight: 10,
|
||||
|
|
|
|||
Loading…
Reference in a new issue