[gnome-shell/wip/rstrode/fix-double-escape-at-unlock-screen: 1/2] unlockDialog: Don't create AuthDialog just to finish it




commit 5d5bfe492cd81a081e80660761bac137d38133bd
Author: Ray Strode <rstrode redhat com>
Date:   Fri Oct 8 11:08:17 2021 -0400

    unlockDialog: Don't create AuthDialog just to finish it
    
    If the the unlock dialog gets finished before an auth dialog is
    created, the code currently creates one just to tell it to finish.
    
    This commit changes the code to skip creating the auth dialog in
    that case.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1999>

 js/ui/unlockDialog.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 370385abc4..f4c76c41ad 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -872,7 +872,11 @@ var UnlockDialog = GObject.registerClass({
     }
 
     finish(onComplete) {
-        this._ensureAuthPrompt();
+        if (!this._authPrompt) {
+            onComplete();
+            return;
+        }
+
         this._authPrompt.finish(onComplete);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]