From 6e27ef8ff9813f5ac8ef1811f995e558a8851f1b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 7 Mar 2014 17:42:53 -0500 Subject: [PATCH] gdm: Emit the 'failed' status immediately, and not on reset There's really no reason to do it this way: it works in both cases, and it's a lot simpler to reason about. --- js/gdm/authPrompt.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index d0280529a..4a4f761e6 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -257,6 +257,8 @@ const AuthPrompt = new Lang.Class({ this.updateSensitivity(true); this.setActorInDefaultButtonWell(null); this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED; + + this.emit('failed'); }, _onVerificationComplete: function() { @@ -428,21 +430,17 @@ const AuthPrompt = new Lang.Class({ }, reset: function() { - let oldStatus = this.verificationStatus; - this.verificationStatus = AuthPromptStatus.NOT_VERIFYING; - - if (oldStatus == AuthPromptStatus.VERIFYING) + if (this.verificationStatus == AuthPromptStatus.VERIFYING) this._userVerifier.cancel(); + this.verificationStatus = AuthPromptStatus.NOT_VERIFYING; + this._queryingService = null; this.clear(); this._message.opacity = 0; this.setUser(null); this.stopSpinning(); - if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED) - this.emit('failed'); - let beginRequestType; if (this._mode == AuthPromptMode.UNLOCK_ONLY) {