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.
This commit is contained in:
Ray Strode 2019-02-06 16:59:36 -05:00
parent 0a54118a52
commit 46fcea566d

View File

@ -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) {