mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-12 13:05:41 +03:00
body parsing disable on feed
This commit is contained in:
parent
69a2f13e2e
commit
390d8b43fe
@ -457,7 +457,7 @@ export const getRankedPosts = async (query, currentUserName, filterNsfw) => {
|
||||
let posts = await client.call('bridge', 'get_ranked_posts', query);
|
||||
|
||||
if (posts) {
|
||||
posts = parsePosts(posts, currentUserName, true);
|
||||
posts = parsePosts(posts, currentUserName);
|
||||
|
||||
if (filterNsfw !== '0') {
|
||||
const updatedPosts = filterNsfwPost(posts, filterNsfw);
|
||||
@ -475,7 +475,7 @@ export const getAccountPosts = async (query, currentUserName, filterNsfw) => {
|
||||
let posts = await client.call('bridge', 'get_account_posts', query);
|
||||
|
||||
if (posts) {
|
||||
posts = parsePosts(posts, currentUserName, true);
|
||||
posts = parsePosts(posts, currentUserName);
|
||||
|
||||
if (filterNsfw !== '0') {
|
||||
const updatedPosts = filterNsfwPost(posts, filterNsfw);
|
||||
|
@ -13,13 +13,13 @@ const webp = Platform.OS === 'ios' ? false : true;
|
||||
|
||||
export const parsePosts = (posts, currentUserName) => {
|
||||
if (posts) {
|
||||
const formattedPosts = posts.map((post) => parsePost(post, currentUserName));
|
||||
const formattedPosts = posts.map((post) => parsePost(post, currentUserName, false, true));
|
||||
return formattedPosts;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export const parsePost = (post, currentUserName, isPromoted) => {
|
||||
export const parsePost = (post, currentUserName, isPromoted, isList = false) => {
|
||||
if (!post) {
|
||||
return null;
|
||||
}
|
||||
@ -36,8 +36,9 @@ export const parsePost = (post, currentUserName, isPromoted) => {
|
||||
post.thumbnail = catchPostImage(post.body, 60, 50, webp ? 'webp' : 'match');
|
||||
post.author_reputation = getReputation(post.author_reputation);
|
||||
post.avatar = getResizedAvatar(get(post, 'author'));
|
||||
|
||||
post.body = renderPostBody(post, true, webp);
|
||||
if (!isList) {
|
||||
post.body = renderPostBody(post, true, webp);
|
||||
}
|
||||
post.summary = postBodySummary(post, 150);
|
||||
post.is_declined_payout = parseAsset(post.max_accepted_payout).amount === 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user