mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 21:01:31 +03:00
updated cache data to match with comment response data
This commit is contained in:
parent
4b8fa871b4
commit
0143fa122f
@ -3,7 +3,7 @@ import ActionSheet from 'react-native-actions-sheet';
|
||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||
import styles from './quickReplyModalStyles';
|
||||
import { forwardRef } from 'react';
|
||||
import { View, Text, Alert, TouchableOpacity, Keyboard } from 'react-native';
|
||||
import { View, Text, Alert, TouchableOpacity, Keyboard, Platform } from 'react-native';
|
||||
import { useIntl } from 'react-intl';
|
||||
import { IconButton, MainButton, SummaryArea, TextButton, TextInput, UserAvatar } from '..';
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
@ -16,6 +16,7 @@ import { default as ROUTES } from '../../constants/routeNames';
|
||||
import get from 'lodash/get';
|
||||
import { navigate } from '../../navigation/service';
|
||||
import { Portal } from 'react-native-portalize';
|
||||
import { markdown2Html } from '@ecency/render-helper/lib/markdown-2-html';
|
||||
|
||||
export interface QuickReplyModalProps {}
|
||||
|
||||
@ -135,18 +136,18 @@ const QuickReplyModal = ({}: QuickReplyModalProps, ref) => {
|
||||
);
|
||||
|
||||
//add comment cache entry
|
||||
const createdAt = new Date().getTime();
|
||||
const createdAt = new Date();
|
||||
dispatch(
|
||||
updateCommentCache(
|
||||
`${currentAccount.name}/${permlink}`,
|
||||
{
|
||||
author:currentAccount.name,
|
||||
permlink,
|
||||
parentAuthor,
|
||||
parentPermlink,
|
||||
content: commentValue,
|
||||
createdAt: createdAt,
|
||||
expiresAt: createdAt + 600000
|
||||
parent_author:parentAuthor,
|
||||
parent_permlink:parentPermlink,
|
||||
body: markdown2Html(commentValue, true, Platform.OS === 'android'),
|
||||
created: createdAt.toString(),
|
||||
expiresAt: createdAt.getTime() + 600000
|
||||
}
|
||||
)
|
||||
)
|
||||
|
@ -11,10 +11,10 @@ export interface Vote {
|
||||
export interface Comment {
|
||||
author:string,
|
||||
permlink:string,
|
||||
parentAuthor:string,
|
||||
parentPermlink:string,
|
||||
content:string,
|
||||
createdAt:number,
|
||||
parent_author:string,
|
||||
parent_permlink:string,
|
||||
body:string,
|
||||
created:string,
|
||||
expiresAt:number,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user