mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 10:28:28 +03:00
fix url if malformed
This commit is contained in:
parent
2ed5c0c5cc
commit
8e2d654b40
1 changed files with 19 additions and 3 deletions
|
@ -1,12 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using Bit.App.Models;
|
|
||||||
using Foundation;
|
using Foundation;
|
||||||
|
|
||||||
namespace Bit.iOS.Extension.Models
|
namespace Bit.iOS.Extension.Models
|
||||||
{
|
{
|
||||||
public class Context
|
public class Context
|
||||||
{
|
{
|
||||||
private DomainName _domainName;
|
private string _uriString;
|
||||||
|
|
||||||
public NSExtensionContext ExtContext { get; set; }
|
public NSExtensionContext ExtContext { get; set; }
|
||||||
public string ProviderType { get; set; }
|
public string ProviderType { get; set; }
|
||||||
|
@ -23,7 +22,24 @@ namespace Bit.iOS.Extension.Models
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public string UrlString { get; set; }
|
public string UrlString
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _uriString;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_uriString = value;
|
||||||
|
if(_uriString != null && _uriString.Contains("."))
|
||||||
|
{
|
||||||
|
if(!_uriString.Contains("://") && !_uriString.Contains(" "))
|
||||||
|
{
|
||||||
|
_uriString = string.Concat("http://", _uriString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public string LoginTitle { get; set; }
|
public string LoginTitle { get; set; }
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
Loading…
Reference in a new issue