[gnome-shell/wip/timed-login-fix: 4/4] loginDialog: hide timed login indicator when timed login is stopped



commit c69cb35dd7da805e3e107214c5d5ab291e7699f2
Author: Ray Strode <rstrode redhat com>
Date:   Wed Feb 6 16:59:36 2019 -0500

    loginDialog: hide timed login indicator when timed login is stopped
    
    At the moment the login screen doesn't hide the timed login indicator,
    once the user is logged in with a timed login operation.
    
    This commit makes sure the timed login indicator gets hidden any time
    the timed login operation completes or is canceled.

 js/gdm/loginDialog.js | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index f09569085..8f0c78e86 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -1051,14 +1051,9 @@ var LoginDialog = new Lang.Class({
         let tasks = [() => this._waitForItemForUser(userName),
 
                      () => {
+                         // If we're just starting out, start on the right item.
                          loginItem = this._userList.getItemFromUserName(userName);
 
-                         // If there is an animation running on the item, reset it.
-                         loginItem.hideTimedLoginIndicator();
-                     },
-
-                     () => {
-                         // If we're just starting out, start on the right item.
                          if (!this._userManager.is_loaded) {
                              this._userList.jumpToItem(loginItem);
                          }
@@ -1099,7 +1094,14 @@ var LoginDialog = new Lang.Class({
 
         this._timedLoginBatch = new Batch.ConsecutiveBatch(this, tasks);
 
-        return this._timedLoginBatch.run();
+        let hold = this._timedLoginBatch.run();
+
+        hold.connect('release', () => {
+            if (loginItem)
+                loginItem.hideTimedLoginIndicator();
+        });
+
+        return hold;
     },
 
     _onTimedLoginRequested(client, userName, seconds) {


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