1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-02 08:30:10 +01:00

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

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