loginDialog: allow timed login with disabled user list
At the moment the timed login feature is implemented in the user list. If there's no user list, we don't show the indicator anywhere and don't proceed with timed login. This commit allows timed login to work when the user list is disabled. It accomplishes this by putting the timed login indicator on the auth prompt, in that scenario.
This commit is contained in:
@ -738,6 +738,9 @@ var LoginDialog = new Lang.Class({
|
||||
|
||||
if (this._authPrompt.verificationStatus == AuthPrompt.AuthPromptStatus.NOT_VERIFYING)
|
||||
this._authPrompt.reset();
|
||||
|
||||
if (this._disableUserList && this._timedLoginUserListHold)
|
||||
this._timedLoginUserListHold.release();
|
||||
}
|
||||
},
|
||||
|
||||
@ -1019,17 +1022,33 @@ var LoginDialog = new Lang.Class({
|
||||
},
|
||||
|
||||
_startTimedLogin(userName, delay) {
|
||||
this._timedLoginUserName = userName;
|
||||
this._timedLoginItem = null;
|
||||
this._timedLoginDelay = delay;
|
||||
this._timedLoginAnimationTime = delay;
|
||||
|
||||
let tasks = [() => this._waitForItemForUser(userName),
|
||||
let tasks = [() => {
|
||||
if (this._disableUserList)
|
||||
return;
|
||||
|
||||
this._timedLoginUserListHold = this._waitForItemForUser(userName);
|
||||
|
||||
return this._timedLoginUserListHold;
|
||||
},
|
||||
|
||||
() => {
|
||||
this._timedLoginUserListHold = null;
|
||||
|
||||
if (this._disableUserList)
|
||||
return;
|
||||
|
||||
this._timedLoginItem = this._userList.getItemFromUserName(userName);
|
||||
},
|
||||
|
||||
() => {
|
||||
if (this._disableUserList)
|
||||
return;
|
||||
|
||||
// If we're just starting out, start on the right
|
||||
// item.
|
||||
if (!this._userManager.is_loaded) {
|
||||
@ -1040,6 +1059,9 @@ var LoginDialog = new Lang.Class({
|
||||
this._blockTimedLoginUntilIdle,
|
||||
|
||||
() => {
|
||||
if (this._disableUserList)
|
||||
return;
|
||||
|
||||
this._userList.scrollToItem(this._timedLoginItem);
|
||||
},
|
||||
|
||||
@ -1064,7 +1086,9 @@ var LoginDialog = new Lang.Class({
|
||||
if (this._timedLoginItem)
|
||||
this._timedLoginItem.hideTimedLoginIndicator();
|
||||
|
||||
let userName = this._timedLoginItem.user.get_user_name();
|
||||
this._authPrompt.hideTimedLoginIndicator();
|
||||
|
||||
let userName = this._timedLoginUserName;
|
||||
|
||||
if (userName)
|
||||
this._startTimedLogin(userName, this._timedLoginDelay);
|
||||
|
Reference in New Issue
Block a user