mirror of
https://github.com/bitwarden/android.git
synced 2024-12-22 17:10:35 +03:00
android app match fixes
This commit is contained in:
parent
b5311e1448
commit
2d6895aeea
1 changed files with 6 additions and 13 deletions
|
@ -64,17 +64,10 @@ namespace Bit.App.Services
|
||||||
|
|
||||||
Uri uri = null;
|
Uri uri = null;
|
||||||
DomainName domainName = null;
|
DomainName domainName = null;
|
||||||
var androidApp = false;
|
var androidApp = UriIsAndroidApp(uriString);
|
||||||
|
|
||||||
if(!Uri.TryCreate(uriString, UriKind.Absolute, out uri) || !DomainName.TryParse(uri.Host, out domainName))
|
if(!androidApp &&
|
||||||
{
|
(!Uri.TryCreate(uriString, UriKind.Absolute, out uri) || !DomainName.TryParse(uri.Host, out domainName)))
|
||||||
if(domainName == null)
|
|
||||||
{
|
|
||||||
androidApp = UriIsAndroidApp(uriString);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!androidApp && domainName == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -91,8 +84,7 @@ namespace Bit.App.Services
|
||||||
{
|
{
|
||||||
matchingDomains.AddRange(eqDomain.Select(d => d).ToList());
|
matchingDomains.AddRange(eqDomain.Select(d => d).ToList());
|
||||||
}
|
}
|
||||||
|
else if(androidAppWebUriString != null && Array.IndexOf(eqDomain, androidAppWebUriString) >= 0)
|
||||||
if(androidAppWebUriString != null && Array.IndexOf(eqDomain, androidAppWebUriString) >= 0)
|
|
||||||
{
|
{
|
||||||
matchingFuzzyDomains.AddRange(eqDomain.Select(d => d).ToList());
|
matchingFuzzyDomains.AddRange(eqDomain.Select(d => d).ToList());
|
||||||
}
|
}
|
||||||
|
@ -108,7 +100,8 @@ namespace Bit.App.Services
|
||||||
matchingDomains.Add(androidApp ? uriString : domainName.BaseDomain);
|
matchingDomains.Add(androidApp ? uriString : domainName.BaseDomain);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(androidApp && androidAppWebUriString != null && !matchingFuzzyDomains.Any())
|
if(androidApp && androidAppWebUriString != null &&
|
||||||
|
!matchingFuzzyDomains.Any() && !matchingDomains.Contains(androidAppWebUriString))
|
||||||
{
|
{
|
||||||
matchingFuzzyDomains.Add(androidAppWebUriString);
|
matchingFuzzyDomains.Add(androidAppWebUriString);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue