Rename slack attachment to message attachment and fix border color on Android (#1533)
This commit is contained in:
parent
fb9760b5a6
commit
3bd7275cfa
5 changed files with 14 additions and 10 deletions
|
|
@ -7,9 +7,9 @@ import PropTypes from 'prop-types';
|
|||
|
||||
import CustomPropTypes from 'app/constants/custom_prop_types';
|
||||
|
||||
import SlackAttachment from './slack_attachment';
|
||||
import MessageAttachment from './message_attachment';
|
||||
|
||||
export default class SlackAttachments extends PureComponent {
|
||||
export default class MessageAttachments extends PureComponent {
|
||||
static propTypes = {
|
||||
attachments: PropTypes.array.isRequired,
|
||||
baseTextStyle: CustomPropTypes.Style,
|
||||
|
|
@ -38,7 +38,7 @@ export default class SlackAttachments extends PureComponent {
|
|||
|
||||
attachments.forEach((attachment, i) => {
|
||||
content.push(
|
||||
<SlackAttachment
|
||||
<MessageAttachment
|
||||
attachment={attachment}
|
||||
baseTextStyle={baseTextStyle}
|
||||
blockStyles={blockStyles}
|
||||
|
|
@ -23,7 +23,7 @@ const STATUS_COLORS = {
|
|||
danger: '#e40303',
|
||||
};
|
||||
|
||||
export default class SlackAttachment extends PureComponent {
|
||||
export default class MessageAttachment extends PureComponent {
|
||||
static propTypes = {
|
||||
attachment: PropTypes.object.isRequired,
|
||||
baseTextStyle: CustomPropTypes.Style,
|
||||
|
|
@ -392,8 +392,12 @@ export default class SlackAttachment extends PureComponent {
|
|||
const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
||||
return {
|
||||
container: {
|
||||
borderColor: changeOpacity(theme.centerChannelColor, 0.15),
|
||||
borderWidth: 1,
|
||||
borderBottomColor: changeOpacity(theme.centerChannelColor, 0.15),
|
||||
borderRightColor: changeOpacity(theme.centerChannelColor, 0.15),
|
||||
borderTopColor: changeOpacity(theme.centerChannelColor, 0.15),
|
||||
borderBottomWidth: 1,
|
||||
borderRightWidth: 1,
|
||||
borderTopWidth: 1,
|
||||
marginTop: 5,
|
||||
padding: 10,
|
||||
},
|
||||
|
|
@ -18,7 +18,7 @@ import youTubeVideoId from 'youtube-video-id';
|
|||
import youtubePlayIcon from 'assets/images/icons/youtube-play-icon.png';
|
||||
|
||||
import PostAttachmentOpenGraph from 'app/components/post_attachment_opengraph';
|
||||
import SlackAttachments from 'app/components/slack_attachments';
|
||||
import MessageAttachments from 'app/components/message_attachments';
|
||||
import CustomPropTypes from 'app/constants/custom_prop_types';
|
||||
import {emptyFunction} from 'app/utils/general';
|
||||
import {isImageLink, isYoutubeLink} from 'app/utils/url';
|
||||
|
|
@ -109,7 +109,7 @@ export default class PostBodyAdditionalContent extends PureComponent {
|
|||
}
|
||||
|
||||
const {isReplyPost, link, openGraphData, showLinkPreviews, theme} = this.props;
|
||||
const attachments = this.getSlackAttachment();
|
||||
const attachments = this.getMessageAttachment();
|
||||
if (attachments) {
|
||||
return attachments;
|
||||
}
|
||||
|
|
@ -154,7 +154,7 @@ export default class PostBodyAdditionalContent extends PureComponent {
|
|||
}
|
||||
};
|
||||
|
||||
getSlackAttachment = () => {
|
||||
getMessageAttachment = () => {
|
||||
const {
|
||||
postId,
|
||||
postProps,
|
||||
|
|
@ -169,7 +169,7 @@ export default class PostBodyAdditionalContent extends PureComponent {
|
|||
|
||||
if (attachments && attachments.length) {
|
||||
return (
|
||||
<SlackAttachments
|
||||
<MessageAttachments
|
||||
attachments={attachments}
|
||||
baseTextStyle={baseTextStyle}
|
||||
blockStyles={blockStyles}
|
||||
|
|
|
|||
Loading…
Reference in a new issue