1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-23 11:45:38 +01:00

search goes to vault apge, not main page

This commit is contained in:
Kyle Spearrin 2017-11-17 13:03:43 -05:00
parent 62db6552d2
commit d1c7309b29
2 changed files with 6 additions and 7 deletions

View File

@ -7,13 +7,13 @@ namespace Bit.App.Pages
{
public class MainPage : ExtendedTabbedPage
{
public MainPage(string uri = null, bool myVault = false)
public MainPage(bool myVault = false)
{
TintColor = Color.FromHex("3c8dbc");
var settingsNavigation = new ExtendedNavigationPage(new SettingsPage());
var favoritesNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(true, uri));
var vaultNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(false, uri));
var favoritesNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(true));
var vaultNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(false));
var toolsNavigation = new ExtendedNavigationPage(new ToolsPage());
favoritesNavigation.Icon = "star.png";
@ -26,7 +26,7 @@ namespace Bit.App.Pages
Children.Add(toolsNavigation);
Children.Add(settingsNavigation);
if(myVault || uri != null)
if(myVault)
{
SelectedItem = vaultNavigation;
}

View File

@ -31,12 +31,11 @@ namespace Bit.App.Pages
{
Uri = uriString;
Uri uri;
if(uriString?.StartsWith(Constants.AndroidAppProtocol) ?? false)
{
_name = uriString.Substring(Constants.AndroidAppProtocol.Length);
}
else if(!System.Uri.TryCreate(uriString, UriKind.Absolute, out uri) ||
else if(!System.Uri.TryCreate(uriString, UriKind.Absolute, out Uri uri) ||
!DomainName.TryParseBaseDomain(uri.Host, out _name))
{
_name = "--";
@ -331,7 +330,7 @@ namespace Bit.App.Pages
{
_page.GoogleAnalyticsService.TrackExtensionEvent("CloseToSearch",
_page.Uri.StartsWith("http") ? "Website" : "App");
Application.Current.MainPage = new MainPage(_page.Uri);
Application.Current.MainPage = new ExtendedNavigationPage(new VaultListCiphersPage(false, _page.Uri));
_page.UserDialogs.Toast(string.Format(AppResources.BitwardenAutofillServiceSearch, _page._name),
TimeSpan.FromSeconds(10));
}