updated side bar changes

This commit is contained in:
u-e 2019-05-18 16:37:08 +03:00
parent 1f8f9544fb
commit 7de1ff14f5
2 changed files with 10 additions and 1 deletions

View File

@ -39,11 +39,16 @@ class SideMenuView extends Component {
// Component Life Cycles // Component Life Cycles
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
const { isLoggedIn } = this.props; const { isLoggedIn, accounts } = this.props;
const { isAddAccountIconActive } = this.state;
if (isLoggedIn !== nextProps.isLoggedIn) { if (isLoggedIn !== nextProps.isLoggedIn) {
this._setMenuItems(nextProps.isLoggedIn); this._setMenuItems(nextProps.isLoggedIn);
} }
if (accounts !== nextProps.accounts && isAddAccountIconActive) {
this.setState({ menuItems: nextProps.accounts });
}
} }
// Component Functions // Component Functions

View File

@ -366,6 +366,8 @@ class EditorContainer extends Component {
key: permlink, key: permlink,
}); });
this.setState({ isPostSending: false });
setDraftPost( setDraftPost(
{ title: '', body: '', tags: '' }, { title: '', body: '', tags: '' },
currentAccount.name, currentAccount.name,
@ -485,6 +487,8 @@ class EditorContainer extends Component {
navigation.goBack(); navigation.goBack();
navigation.state.params.fetchPost(); navigation.state.params.fetchPost();
} }
this.setState({ isPostSending: false });
}; };
_handleOnBackPress = () => { _handleOnBackPress = () => {