Web: People: Return to profile editor after save avatar
This commit is contained in:
parent
237f737ba7
commit
5838cd617c
@ -105,6 +105,7 @@ class AvatarEditorPage extends React.PureComponent {
|
||||
})
|
||||
.then(() => {
|
||||
this.props.fetchProfile(profile.id);
|
||||
this.returnToEditor(false);
|
||||
});
|
||||
} else {
|
||||
deleteAvatar(profile.id)
|
||||
@ -114,7 +115,10 @@ class AvatarEditorPage extends React.PureComponent {
|
||||
})
|
||||
.catch((error) => toastr.error(error))
|
||||
.then(() => this.props.updateProfile(this.props.profile))
|
||||
.then(() => this.props.fetchProfile(profile.id));
|
||||
.then(() => {
|
||||
this.props.fetchProfile(profile.id);
|
||||
this.returnToEditor(false);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -171,7 +171,8 @@ class UpdateUserForm extends React.Component {
|
||||
[dialogsDataset.changeEmail]: false,
|
||||
currentDialog: "",
|
||||
},
|
||||
isMobile: isMobile || isTablet, };
|
||||
isMobile: isMobile || isTablet,
|
||||
};
|
||||
|
||||
//Set unique contacts id
|
||||
const now = new Date().getTime();
|
||||
@ -420,7 +421,6 @@ class UpdateUserForm extends React.Component {
|
||||
})
|
||||
.then(() => {
|
||||
toastr.success(this.props.t("ChangesSavedSuccessfully"));
|
||||
this.setState({ isLoading: false });
|
||||
this.setIsEdit();
|
||||
})
|
||||
.catch((error) => {
|
||||
@ -429,19 +429,30 @@ class UpdateUserForm extends React.Component {
|
||||
})
|
||||
.then(() => {
|
||||
this.props.updateProfile(this.props.profile);
|
||||
this.setState({ isLoading: false });
|
||||
})
|
||||
.then(() => {
|
||||
this.props.fetchProfile(profile.id);
|
||||
}); } else {
|
||||
this.setState({
|
||||
isLoading: false,
|
||||
visibleAvatarEditor: false
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
this.setState(this.mapPropsToState(this.props));
|
||||
});
|
||||
} else {
|
||||
deleteAvatar(profile.id)
|
||||
.then(() => { toastr.success(this.props.t("ChangesSavedSuccessfully"));
|
||||
this.setState({ isLoading: false });
|
||||
.then(() => {
|
||||
toastr.success(this.props.t("ChangesSavedSuccessfully"));
|
||||
this.setState({
|
||||
isLoading: false,
|
||||
visibleAvatarEditor: false
|
||||
});
|
||||
this.setIsEdit();
|
||||
})
|
||||
.catch((error) => toastr.error(error))
|
||||
.then(() => this.props.updateProfile(this.props.profile))
|
||||
.then(() => this.props.fetchProfile(profile.id)); }
|
||||
.then(() => this.props.fetchProfile(profile.id));
|
||||
}
|
||||
};
|
||||
|
||||
onCloseAvatarEditor() {
|
||||
|
Loading…
Reference in New Issue
Block a user