mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-05 05:38:41 +03:00
Only dispatch password_changed when password has changed
This commit is contained in:
parent
c6ff45261d
commit
219bfffea2
2 changed files with 5 additions and 2 deletions
|
@ -38,7 +38,7 @@ export default React.createClass({
|
|||
},
|
||||
|
||||
_onPasswordChanged: function() {
|
||||
this.props.onFinished();
|
||||
this.props.onFinished(true);
|
||||
},
|
||||
|
||||
_onPasswordChangeError: function(err) {
|
||||
|
|
|
@ -25,7 +25,10 @@ export default React.createClass({
|
|||
onUpdateClicked: function() {
|
||||
const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
|
||||
Modal.createDialog(SetPasswordDialog, {
|
||||
onFinished: () => {
|
||||
onFinished: (passwordChanged) => {
|
||||
if (!passwordChanged) {
|
||||
return;
|
||||
}
|
||||
// Notify SessionStore that the user's password was changed
|
||||
dis.dispatch({
|
||||
action: 'password_changed',
|
||||
|
|
Loading…
Reference in a new issue