Skip to content

Commit 219bfff

Browse files
author
Luke Barnard
committed
Only dispatch password_changed when password has changed
1 parent c6ff452 commit 219bfff

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/components/views/dialogs/SetPasswordDialog.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default React.createClass({
3838
},
3939

4040
_onPasswordChanged: function() {
41-
this.props.onFinished();
41+
this.props.onFinished(true);
4242
},
4343

4444
_onPasswordChangeError: function(err) {

‎src/components/views/globals/PasswordNagBar.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export default React.createClass({
2525
onUpdateClicked: function() {
2626
const SetPasswordDialog = sdk.getComponent('dialogs.SetPasswordDialog');
2727
Modal.createDialog(SetPasswordDialog, {
28-
onFinished: () => {
28+
onFinished: (passwordChanged) => {
29+
if (!passwordChanged) {
30+
return;
31+
}
2932
// Notify SessionStore that the user's password was changed
3033
dis.dispatch({
3134
action: 'password_changed',

0 commit comments

Comments
 (0)