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() {
|
_onPasswordChanged: function() {
|
||||||
this.props.onFinished();
|
this.props.onFinished(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onPasswordChangeError: function(err) {
|
_onPasswordChangeError: function(err) {
|
||||||
|
@ -25,7 +25,10 @@ export default React.createClass({
|
|||||||
onUpdateClicked: function() {
|
onUpdateClicked: function() {
|
||||||
const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
|
const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
|
||||||
Modal.createDialog(SetPasswordDialog, {
|
Modal.createDialog(SetPasswordDialog, {
|
||||||
onFinished: () => {
|
onFinished: (passwordChanged) => {
|
||||||
|
if (!passwordChanged) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Notify SessionStore that the user's password was changed
|
// Notify SessionStore that the user's password was changed
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'password_changed',
|
action: 'password_changed',
|
||||||
|
Loading…
Reference in New Issue
Block a user