mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 13:22:02 +03:00
support for entities using updated render-helper
This commit is contained in:
parent
ccbce77bc5
commit
b697d6522d
@ -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);
|
||||
|
@ -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 = () => {
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user