mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Only dispatch password_changed when password has changed
This commit is contained in:
parent
c6ff45261d
commit
219bfffea2
@ -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 New Issue
Block a user