support for entities using updated render-helper

This commit is contained in:
noumantahir 2022-01-03 22:23:56 +05:00
parent ccbce77bc5
commit b697d6522d
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,5 @@
import React, { useState, useEffect, useCallback } from 'react';
import { Platform } from 'react-native';
import { withNavigation } from 'react-navigation';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
@ -229,7 +230,7 @@ const CommentsContainer = ({
writeToClipboard(`https://ecency.com${get(selectedComment, 'url')}`).then(_showCopiedToast);
}
if (index === 1) {
const body = postBodySummary(selectedComment.markdownBody);
const body = postBodySummary(selectedComment.markdownBody, null, Platform.OS);
writeToClipboard(body).then(_showCopiedToast);
} else if (index === 2) {
_openReplyThread(selectedComment);

View File

@ -1,6 +1,6 @@
import React, { useState, useRef } from 'react';
import { injectIntl } from 'react-intl';
import { View, FlatList, Text } from 'react-native';
import { View, FlatList, Text, Platform } from 'react-native';
import ScrollableTabView from 'react-native-scrollable-tab-view';
// Utils
@ -49,7 +49,7 @@ const DraftsScreen = ({
item.meta && item.meta.image
? catchImageFromMetadata(item.meta, 'match', true)
: catchDraftImage(item.body, 'match', true);
const summary = postBodySummary({ ...item, last_update: item.modified }, 100);
const summary = postBodySummary({ ...item, last_update: item.modified }, 100, Platform.OS);
const isSchedules = type === 'schedules';
const _onItemPress = () => {

View File

@ -52,7 +52,7 @@ export const parsePost = (post, currentUserName, isPromoted, isList = false) =>
if (!isList) {
post.body = renderPostBody(post, true, webp);
}
post.summary = postBodySummary(post, 150);
post.summary = postBodySummary(post, 150, Platform.OS);
post.max_payout = parseAsset(post.max_accepted_payout).amount || 0;
post.is_declined_payout = post.max_payout === 0;