preserving blog pinned status while updating profile

This commit is contained in:
noumantahir 2022-04-08 05:17:57 +05:00
parent 03034d91b7
commit 33065ad1b0

View File

@ -58,6 +58,7 @@ class ProfileEditContainer extends Component {
location: get(props.currentAccount, 'about.profile.location'),
website: get(props.currentAccount, 'about.profile.website'),
coverUrl: get(props.currentAccount, 'about.profile.cover_image'),
pinned: get(props.currentAccount, 'about.profile.pinned'),
avatarUrl: get(props.currentAccount, 'avatar'),
};
}
@ -145,7 +146,7 @@ class ProfileEditContainer extends Component {
_handleOnSubmit = async () => {
const { currentAccount, pinCode, dispatch, navigation, intl } = this.props;
const { name, location, website, about, coverUrl, avatarUrl } = this.state;
const { name, location, website, about, coverUrl, avatarUrl, pinned } = this.state;
this.setState({ isLoading: true });
@ -157,6 +158,7 @@ class ProfileEditContainer extends Component {
website,
about,
location,
pinned,
version: 2,
};