diff --git a/app/components/app_icon.js b/app/components/app_icon.js
index fe573b8a8..6d8a775df 100644
--- a/app/components/app_icon.js
+++ b/app/components/app_icon.js
@@ -8,7 +8,7 @@ import Svg, {
Path,
} from 'react-native-svg';
-export default class AwayStatus extends PureComponent {
+export default class AppIcon extends PureComponent {
static propTypes = {
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
diff --git a/app/components/deleted_post.js b/app/components/deleted_post.js
new file mode 100644
index 000000000..0f78eb841
--- /dev/null
+++ b/app/components/deleted_post.js
@@ -0,0 +1,81 @@
+// Copyright (c) 2018-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import React, {PureComponent} from 'react';
+import {View} from 'react-native';
+import PropTypes from 'prop-types';
+import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
+import FormattedText from 'app/components/formatted_text';
+import AppIcon from 'app/components/app_icon';
+import {ViewTypes} from 'app/constants';
+
+class DeletedPost extends PureComponent {
+ static propTypes = {
+ theme: PropTypes.object.isRequired,
+ };
+
+ render() {
+ const {theme} = this.props;
+ const style = getStyleSheet(theme);
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+const getStyleSheet = makeStyleSheetFromTheme((theme) => {
+ const stdPadding = 12;
+ return {
+ main: {
+ flexDirection: 'row',
+ paddingTop: stdPadding,
+ },
+ iconContainer: {
+ paddingRight: stdPadding,
+ paddingLeft: stdPadding,
+ width: (stdPadding * 2) + ViewTypes.PROFILE_PICTURE_SIZE,
+ },
+ textContainer: {
+ paddingBottom: 10,
+ flex: 1,
+ marginRight: stdPadding,
+ },
+ messageContainer: {
+ marginTop: 3,
+ },
+ displayName: {
+ color: theme.centerChannelColor,
+ fontSize: 15,
+ fontWeight: '600',
+ },
+ message: {
+ color: changeOpacity(theme.centerChannelColor, 0.8),
+ fontSize: 15,
+ lineHeight: 22,
+ },
+ };
+});
+
+export default DeletedPost;
\ No newline at end of file
diff --git a/app/components/post_list/post_list.js b/app/components/post_list/post_list.js
index c87d60d0b..b5d7b349c 100644
--- a/app/components/post_list/post_list.js
+++ b/app/components/post_list/post_list.js
@@ -53,6 +53,7 @@ export default class PostList extends PureComponent {
showLoadMore: PropTypes.bool,
shouldRenderReplyButton: PropTypes.bool,
theme: PropTypes.object.isRequired,
+ renderFooter: PropTypes.func,
};
static defaultProps = {
@@ -319,6 +320,10 @@ export default class PostList extends PureComponent {
};
renderFooter = () => {
+ if (this.props.renderFooter) {
+ return this.props.renderFooter();
+ }
+
if (!this.props.channelId) {
return null;
}
diff --git a/app/components/post_profile_picture/post_profile_picture.js b/app/components/post_profile_picture/post_profile_picture.js
index 7be267071..fe5302491 100644
--- a/app/components/post_profile_picture/post_profile_picture.js
+++ b/app/components/post_profile_picture/post_profile_picture.js
@@ -9,8 +9,7 @@ import AppIcon from 'app/components/app_icon';
import ProfilePicture from 'app/components/profile_picture';
import {emptyFunction} from 'app/utils/general';
import webhookIcon from 'assets/images/icons/webhook.jpg';
-
-const PROFILE_PICTURE_SIZE = 32;
+import {ViewTypes} from 'app/constants';
export default class PostProfilePicture extends PureComponent {
static propTypes = {
@@ -43,8 +42,8 @@ export default class PostProfilePicture extends PureComponent {
);
@@ -58,9 +57,9 @@ export default class PostProfilePicture extends PureComponent {
@@ -70,7 +69,7 @@ export default class PostProfilePicture extends PureComponent {
let component = (
);
diff --git a/app/constants/view.js b/app/constants/view.js
index a4d91ddcb..82f3b2c7c 100644
--- a/app/constants/view.js
+++ b/app/constants/view.js
@@ -81,4 +81,5 @@ export default {
IOS_TOP_PORTRAIT: 64,
IOSX_TOP_PORTRAIT: 88,
STATUS_BAR_HEIGHT: 20,
+ PROFILE_PICTURE_SIZE: 32,
};
diff --git a/app/screens/thread/thread.js b/app/screens/thread/thread.js
index d37b089d0..fe5c4b691 100644
--- a/app/screens/thread/thread.js
+++ b/app/screens/thread/thread.js
@@ -14,6 +14,7 @@ import PostTextbox from 'app/components/post_textbox';
import SafeAreaView from 'app/components/safe_area_view';
import StatusBar from 'app/components/status_bar';
import {makeStyleSheetFromTheme, setNavigatorStyles} from 'app/utils/theme';
+import DeletedPost from 'app/components/deleted_post';
class Thread extends PureComponent {
static propTypes = {
@@ -81,6 +82,19 @@ class Thread extends PureComponent {
}
};
+ hasRootPost = () => {
+ return this.props.postIds.includes(this.props.rootId);
+ }
+
+ renderFooter = () => {
+ if (!this.hasRootPost()) {
+ return (
+
+ );
+ }
+ return null;
+ }
+
render() {
const {
channelId,
@@ -104,17 +118,19 @@ class Thread extends PureComponent {
keyboardVerticalOffset={65}
>
+ {this.hasRootPost() &&
+ />}
);