mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-04 12:05:54 +03:00
Merge pull request #349 from esteemapp/bugfix/#337
fixed and closed #337
This commit is contained in:
commit
bc7867b731
6
index.js
6
index.js
@ -1,10 +1,10 @@
|
||||
import 'core-js';
|
||||
import { AppRegistry } from 'react-native';
|
||||
import codePush from 'react-native-code-push';
|
||||
import { name as appName } from './app.json';
|
||||
import 'core-js';
|
||||
import 'intl';
|
||||
import codePush from "react-native-code-push";
|
||||
|
||||
//set check frequency options
|
||||
// set check frequency options
|
||||
const codePushOptions = { checkFrequency: codePush.CheckFrequency.ON_APP_START };
|
||||
const eSteemApp = codePush(codePushOptions)(require('./App').default);
|
||||
|
||||
|
@ -76,7 +76,7 @@ class PostCard extends Component {
|
||||
reblogedBy={reblogedBy}
|
||||
/>
|
||||
<View style={styles.dropdownWrapper}>
|
||||
<PostDropdown content={content} />
|
||||
<PostDropdown content={content} fetchPost={fetchPost} />
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.postBodyWrapper}>
|
||||
|
@ -74,13 +74,17 @@ class PostDropdownContainer extends PureComponent {
|
||||
};
|
||||
|
||||
_replyNavigation = () => {
|
||||
const { navigation, content, isLoggedIn } = this.props;
|
||||
const {
|
||||
navigation, content, isLoggedIn, fetchPost,
|
||||
} = this.props;
|
||||
|
||||
if (isLoggedIn) {
|
||||
navigation.navigate({
|
||||
routeName: ROUTES.SCREENS.EDITOR,
|
||||
params: {
|
||||
isReply: true,
|
||||
post: content,
|
||||
fetchPost,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -52,10 +52,14 @@ class PostContainer extends Component {
|
||||
|
||||
// Component Functions
|
||||
|
||||
_loadPost = async (author, permlink) => {
|
||||
_loadPost = async (author = null, permlink = null) => {
|
||||
const { currentAccount, isLoggedIn } = this.props;
|
||||
const { post } = this.state;
|
||||
|
||||
await getPost(author, permlink, isLoggedIn && currentAccount.username)
|
||||
const _author = author || post.author;
|
||||
const _permlink = permlink || post.permlink;
|
||||
|
||||
await getPost(_author, _permlink, isLoggedIn && currentAccount.username)
|
||||
.then((result) => {
|
||||
if (result) {
|
||||
this.setState({ post: result });
|
||||
|
@ -33,7 +33,7 @@ class PostScreen extends PureComponent {
|
||||
isHasDropdown
|
||||
title="Post"
|
||||
content={post}
|
||||
dropdownComponent={<PostDropdown content={post} />}
|
||||
dropdownComponent={<PostDropdown content={post} fetchPost={fetchPost} />}
|
||||
isNewPost={isNewPost}
|
||||
/>
|
||||
<PostDisplay
|
||||
|
Loading…
Reference in New Issue
Block a user