mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
search goes to vault apge, not main page
This commit is contained in:
parent
62db6552d2
commit
d1c7309b29
2 changed files with 6 additions and 7 deletions
|
@ -7,13 +7,13 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
public class MainPage : ExtendedTabbedPage
|
public class MainPage : ExtendedTabbedPage
|
||||||
{
|
{
|
||||||
public MainPage(string uri = null, bool myVault = false)
|
public MainPage(bool myVault = false)
|
||||||
{
|
{
|
||||||
TintColor = Color.FromHex("3c8dbc");
|
TintColor = Color.FromHex("3c8dbc");
|
||||||
|
|
||||||
var settingsNavigation = new ExtendedNavigationPage(new SettingsPage());
|
var settingsNavigation = new ExtendedNavigationPage(new SettingsPage());
|
||||||
var favoritesNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(true, uri));
|
var favoritesNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(true));
|
||||||
var vaultNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(false, uri));
|
var vaultNavigation = new ExtendedNavigationPage(new VaultListCiphersPage(false));
|
||||||
var toolsNavigation = new ExtendedNavigationPage(new ToolsPage());
|
var toolsNavigation = new ExtendedNavigationPage(new ToolsPage());
|
||||||
|
|
||||||
favoritesNavigation.Icon = "star.png";
|
favoritesNavigation.Icon = "star.png";
|
||||||
|
@ -26,7 +26,7 @@ namespace Bit.App.Pages
|
||||||
Children.Add(toolsNavigation);
|
Children.Add(toolsNavigation);
|
||||||
Children.Add(settingsNavigation);
|
Children.Add(settingsNavigation);
|
||||||
|
|
||||||
if(myVault || uri != null)
|
if(myVault)
|
||||||
{
|
{
|
||||||
SelectedItem = vaultNavigation;
|
SelectedItem = vaultNavigation;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,11 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
Uri = uriString;
|
Uri = uriString;
|
||||||
|
|
||||||
Uri uri;
|
|
||||||
if(uriString?.StartsWith(Constants.AndroidAppProtocol) ?? false)
|
if(uriString?.StartsWith(Constants.AndroidAppProtocol) ?? false)
|
||||||
{
|
{
|
||||||
_name = uriString.Substring(Constants.AndroidAppProtocol.Length);
|
_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))
|
!DomainName.TryParseBaseDomain(uri.Host, out _name))
|
||||||
{
|
{
|
||||||
_name = "--";
|
_name = "--";
|
||||||
|
@ -331,7 +330,7 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
_page.GoogleAnalyticsService.TrackExtensionEvent("CloseToSearch",
|
_page.GoogleAnalyticsService.TrackExtensionEvent("CloseToSearch",
|
||||||
_page.Uri.StartsWith("http") ? "Website" : "App");
|
_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),
|
_page.UserDialogs.Toast(string.Format(AppResources.BitwardenAutofillServiceSearch, _page._name),
|
||||||
TimeSpan.FromSeconds(10));
|
TimeSpan.FromSeconds(10));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue