Skip to content
Snippets Groups Projects
Commit 41f32bd2 authored by Yilei Yang's avatar Yilei Yang
Browse files

Auto select the account in the password manager after auth.

parent ef97b181
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -37,6 +37,7 @@ static BOOL sAuthenticated;
NSArray *_accounts;
NSString *_passwordBeingShown;
NSInteger _rowForPasswordBeingShown;
NSString *_selectedAccountNameBeforeAuthenticated;
}
 
+ (NSArray *)accountNamesWithFilter:(NSString *)filter {
Loading
Loading
@@ -190,6 +191,8 @@ static BOOL sAuthenticated;
if (index != NSNotFound) {
[_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:index]
byExtendingSelection:NO];
} else if (!sAuthenticated) {
_selectedAccountNameBeforeAuthenticated = name;
}
}
 
Loading
Loading
@@ -351,7 +354,11 @@ static BOOL sAuthenticated;
 
if (success) {
[self reloadAccounts];
[[self window] makeFirstResponder:_searchField];
if (_selectedAccountNameBeforeAuthenticated) {
[self selectAccountName:_selectedAccountNameBeforeAuthenticated];
} else {
[[self window] makeFirstResponder:_searchField];
}
} else {
[self closeOrEndSheet];
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment