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



commit 46fcea566d83402a5b69029f2c4a3397a0c71668
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 dbf0525ec..bcf1902e2 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -1045,14 +1045,9 @@ var LoginDialog = GObject.registerClass({
         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);
                          }
@@ -1093,7 +1088,14 @@ var LoginDialog = GObject.registerClass({
 
         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]