focus search after content results are set

This commit is contained in:
Kyle Spearrin 2017-11-27 22:49:27 -05:00
parent 155b8b472f
commit 615a7670bd
1 changed files with 6 additions and 6 deletions

View File

@ -270,12 +270,6 @@ namespace Bit.App.Pages
Search.TextChanged += SearchBar_TextChanged;
Search.SearchButtonPressed += SearchBar_SearchButtonPressed;
_filterResultsCancellationTokenSource = FetchAndLoadVault();
if(string.IsNullOrWhiteSpace(_uri) && !_folder && string.IsNullOrWhiteSpace(_folderId) &&
string.IsNullOrWhiteSpace(_collectionId) && !_favorites)
{
Search.FocusWithDelay(forceDelay: true);
}
}
protected override void OnDisappearing()
@ -353,6 +347,12 @@ namespace Bit.App.Pages
if(PresentationSections.Count > 0 || !string.IsNullOrWhiteSpace(Search.Text))
{
Content = ResultsStackLayout;
if(string.IsNullOrWhiteSpace(_uri) && !_folder && string.IsNullOrWhiteSpace(_folderId) &&
string.IsNullOrWhiteSpace(_collectionId) && !_favorites)
{
Search.Focus();
}
}
else if(_syncService.SyncInProgress)
{