mirror of
https://github.com/bitwarden/mobile
synced 2025-12-12 22:33:25 +00:00
Changed all C# control flow block statements to include space between keyword and open paren (#800)
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Bit.App.Controls
|
||||
public CipherViewCell()
|
||||
{
|
||||
_environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService");
|
||||
if(Device.RuntimePlatform == Device.iOS)
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
InitializeComponent();
|
||||
_viewModel = _grid.BindingContext as CipherViewCellViewModel;
|
||||
@@ -60,11 +60,11 @@ namespace Bit.App.Controls
|
||||
protected override void OnPropertyChanged(string propertyName = null)
|
||||
{
|
||||
base.OnPropertyChanged(propertyName);
|
||||
if(_usingNativeCell)
|
||||
if (_usingNativeCell)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(propertyName == CipherProperty.PropertyName)
|
||||
if (propertyName == CipherProperty.PropertyName)
|
||||
{
|
||||
_viewModel.Cipher = Cipher;
|
||||
}
|
||||
@@ -73,25 +73,25 @@ namespace Bit.App.Controls
|
||||
protected override void OnBindingContextChanged()
|
||||
{
|
||||
base.OnBindingContextChanged();
|
||||
if(_usingNativeCell)
|
||||
if (_usingNativeCell)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_image.Source = null;
|
||||
CipherView cipher = null;
|
||||
if(BindingContext is GroupingsPageListItem groupingsPageListItem)
|
||||
if (BindingContext is GroupingsPageListItem groupingsPageListItem)
|
||||
{
|
||||
cipher = groupingsPageListItem.Cipher;
|
||||
}
|
||||
else if(BindingContext is CipherView cv)
|
||||
else if (BindingContext is CipherView cv)
|
||||
{
|
||||
cipher = cv;
|
||||
}
|
||||
if(cipher != null)
|
||||
if (cipher != null)
|
||||
{
|
||||
var iconImage = GetIconImage(cipher);
|
||||
if(iconImage.Item2 != null)
|
||||
if (iconImage.Item2 != null)
|
||||
{
|
||||
_image.IsVisible = true;
|
||||
_icon.IsVisible = false;
|
||||
@@ -111,7 +111,7 @@ namespace Bit.App.Controls
|
||||
{
|
||||
string icon = null;
|
||||
string image = null;
|
||||
switch(cipher.Type)
|
||||
switch (cipher.Type)
|
||||
{
|
||||
case CipherType.Login:
|
||||
var loginIconImage = GetLoginIconImage(cipher);
|
||||
@@ -137,36 +137,36 @@ namespace Bit.App.Controls
|
||||
{
|
||||
string icon = "";
|
||||
string image = null;
|
||||
if(cipher.Login.Uri != null)
|
||||
if (cipher.Login.Uri != null)
|
||||
{
|
||||
var hostnameUri = cipher.Login.Uri;
|
||||
var isWebsite = false;
|
||||
|
||||
if(hostnameUri.StartsWith(Constants.AndroidAppProtocol))
|
||||
if (hostnameUri.StartsWith(Constants.AndroidAppProtocol))
|
||||
{
|
||||
icon = "";
|
||||
}
|
||||
else if(hostnameUri.StartsWith(Constants.iOSAppProtocol))
|
||||
else if (hostnameUri.StartsWith(Constants.iOSAppProtocol))
|
||||
{
|
||||
icon = "";
|
||||
}
|
||||
else if(WebsiteIconsEnabled && !hostnameUri.Contains("://") && hostnameUri.Contains("."))
|
||||
else if (WebsiteIconsEnabled && !hostnameUri.Contains("://") && hostnameUri.Contains("."))
|
||||
{
|
||||
hostnameUri = string.Concat("http://", hostnameUri);
|
||||
isWebsite = true;
|
||||
}
|
||||
else if(WebsiteIconsEnabled)
|
||||
else if (WebsiteIconsEnabled)
|
||||
{
|
||||
isWebsite = hostnameUri.StartsWith("http") && hostnameUri.Contains(".");
|
||||
}
|
||||
|
||||
if(WebsiteIconsEnabled && isWebsite)
|
||||
if (WebsiteIconsEnabled && isWebsite)
|
||||
{
|
||||
var hostname = CoreHelpers.GetHostname(hostnameUri);
|
||||
var iconsUrl = _environmentService.IconsUrl;
|
||||
if(string.IsNullOrWhiteSpace(iconsUrl))
|
||||
if (string.IsNullOrWhiteSpace(iconsUrl))
|
||||
{
|
||||
if(!string.IsNullOrWhiteSpace(_environmentService.BaseUrl))
|
||||
if (!string.IsNullOrWhiteSpace(_environmentService.BaseUrl))
|
||||
{
|
||||
iconsUrl = string.Format("{0}/icons", _environmentService.BaseUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user