diff --git a/src/components/parentPost/view/parentPostView.js b/src/components/parentPost/view/parentPostView.js
index 7af6aeeb9..5d224ac89 100644
--- a/src/components/parentPost/view/parentPostView.js
+++ b/src/components/parentPost/view/parentPostView.js
@@ -2,7 +2,6 @@ import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { withNavigation } from 'react-navigation';
import get from 'lodash/get';
-import { postBodySummary } from '@esteemapp/esteem-render-helpers';
import { default as ROUTES } from '../../../constants/routeNames';
import styles from './parentPostStyles';
@@ -26,7 +25,7 @@ const ParentPost = props => {
}
>
{get(post, 'title')}
- {postBodySummary(post, 100)}
+ {get(post, 'summary')}
);
diff --git a/src/components/postCard/view/postCardStyles.js b/src/components/postCard/view/postCardStyles.js
index 1ae971c68..7100359a9 100644
--- a/src/components/postCard/view/postCardStyles.js
+++ b/src/components/postCard/view/postCardStyles.js
@@ -51,6 +51,10 @@ export default EStyleSheet.create({
marginVertical: 12,
color: '$primaryBlack',
},
+ summary: {
+ fontSize: 13,
+ color: '$primaryDarkGray',
+ },
bodyFooter: {
backgroundColor: '$primaryBackgroundColor',
flexDirection: 'row',
diff --git a/src/components/postCard/view/postCardView.js b/src/components/postCard/view/postCardView.js
index 7a393ae5c..3153416e1 100644
--- a/src/components/postCard/view/postCardView.js
+++ b/src/components/postCard/view/postCardView.js
@@ -117,6 +117,7 @@ class PostCardView extends Component {
)}
{content.title}
+ {content.summary}
diff --git a/src/components/postListItem/view/postListItemStyles.js b/src/components/postListItem/view/postListItemStyles.js
index 9c6f1e8f5..e5b03ca79 100644
--- a/src/components/postListItem/view/postListItemStyles.js
+++ b/src/components/postListItem/view/postListItemStyles.js
@@ -39,6 +39,10 @@ export default EStyleSheet.create({
fontWeight: 'bold',
color: '$primaryBlack',
},
+ summary: {
+ fontSize: 13,
+ color: '$primaryDarkText',
+ },
header: {
backgroundColor: '$primaryBackgroundColor',
flexDirection: 'row',
diff --git a/src/components/postListItem/view/postListItemView.js b/src/components/postListItem/view/postListItemView.js
index 4ef291843..d17fdd16a 100644
--- a/src/components/postListItem/view/postListItemView.js
+++ b/src/components/postListItem/view/postListItemView.js
@@ -19,6 +19,7 @@ import styles from './postListItemStyles';
const PostListItemView = ({
title,
+ summary,
mainTag,
username,
reputation,
@@ -62,6 +63,7 @@ const PostListItemView = ({
{title}
+ {summary}
diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js
index 3421d0ed3..943a1e409 100644
--- a/src/screens/application/container/applicationContainer.js
+++ b/src/screens/application/container/applicationContainer.js
@@ -516,6 +516,9 @@ class ApplicationContainer extends Component {
dispatch(updateActiveBottomTab(ROUTES.TABBAR.NOTIFICATION));
}
};
+ ws.onclose = e => {
+ console.log(e);
+ };
};
_logout = () => {
diff --git a/src/screens/drafts/screen/draftsScreen.js b/src/screens/drafts/screen/draftsScreen.js
index fed29dfec..c328b04ae 100644
--- a/src/screens/drafts/screen/draftsScreen.js
+++ b/src/screens/drafts/screen/draftsScreen.js
@@ -5,6 +5,7 @@ import ScrollableTabView from 'react-native-scrollable-tab-view';
import ActionSheet from 'react-native-actionsheet';
// Utils
+import { postBodySummary } from '@esteemapp/esteem-render-helpers';
import { catchDraftImage } from '../../../utils/image';
import { getFormatedCreatedDate } from '../../../utils/time';
@@ -46,6 +47,7 @@ const DraftsScreen = ({
const tags = item.tags ? item.tags.split(/[ ,]+/) : [];
const tag = tags[0] || '';
const image = catchDraftImage(item.body);
+ const summary = postBodySummary({ item, last_update: item.created }, 100);
const isSchedules = type === 'schedules';
return (
@@ -53,6 +55,7 @@ const DraftsScreen = ({
created={isSchedules ? getFormatedCreatedDate(item.schedule) : item.created}
mainTag={tag}
title={item.title}
+ summary={summary}
isFormatedDate={isSchedules}
image={image ? { uri: catchDraftImage(item.body) } : null}
username={currentAccount.name}
diff --git a/src/utils/postParser.js b/src/utils/postParser.js
index 21ab5d29c..544e9df49 100644
--- a/src/utils/postParser.js
+++ b/src/utils/postParser.js
@@ -2,7 +2,7 @@ import isEmpty from 'lodash/isEmpty';
import forEach from 'lodash/forEach';
import { get, uniqBy } from 'lodash';
-import { renderPostBody } from '@esteemapp/esteem-render-helpers';
+import { postBodySummary, renderPostBody } from '@esteemapp/esteem-render-helpers';
// Dsteem
// eslint-disable-next-line import/no-cycle
@@ -44,6 +44,7 @@ export const parsePost = async (post, currentUserName, isPromoted) => {
post.active_votes.sort((a, b) => b.rshares - a.rshares);
post.body = renderPostBody(post);
+ post.summary = postBodySummary(post, 150);
post.is_declined_payout = Number(parseFloat(post.max_accepted_payout)) === 0;
if (currentUserName) {