1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-19 17:53:47 +00:00

added domain name parsing. moved iphone debug profile to only arm64 for faster building.

This commit is contained in:
Kyle Spearrin
2016-06-26 00:16:10 -04:00
parent e38dbff152
commit 954e2294c0
8 changed files with 12010 additions and 16 deletions

View File

@@ -13,6 +13,7 @@ namespace Bit.App.Models.Page
private string _uri;
private string _notes;
private bool _revealPassword;
private string _uriHost;
public VaultViewSitePageModel() { }
@@ -68,19 +69,34 @@ namespace Bit.App.Models.Page
{
get
{
if(ShowUri)
if(!ShowUri)
{
try
{
return new Uri(Uri).Host;
}
catch
{
return Uri;
}
return null;
}
return null;
if(_uriHost != null)
{
return _uriHost;
}
try
{
DomainName domain;
if(DomainName.TryParse(Uri, out domain))
{
_uriHost = domain.Domain;
}
else
{
_uriHost = new Uri(Uri).Host;
}
return _uriHost;
}
catch
{
return Uri;
}
}
}