authPrompt: Only wiggle the entry on failures coming from the querying service

Currently whenever an authentication failure happens we wiggle the
entry, however this may not be related to the service which failed.

For example if the fingerprint authentication failed for whatever reason,
there's no point to wiggle the text input as it's something unrelated to it.

So, only apply the wiggle effect to the entry in case the failure is
coming from the querying service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1652>
This commit is contained in:
Marco Trevisan (Treviño) 2021-02-01 19:39:03 +01:00 committed by Ray Strode
parent 526f0711f1
commit 19c4dce322

View File

@ -279,6 +279,7 @@ var AuthPrompt = GObject.registerClass({
}
_onVerificationFailed(userVerifier, serviceName, canRetry) {
const wasQueryingService = this._queryingService === serviceName;
this._queryingService = null;
this.clear();
@ -286,7 +287,8 @@ var AuthPrompt = GObject.registerClass({
this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
Util.wiggle(this._entry);
if (wasQueryingService)
Util.wiggle(this._entry);
}
_onVerificationComplete() {