1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

Changed all C# control flow block statements to include space between keyword and open paren (#800)

This commit is contained in:
Chad Scharf
2020-03-28 09:16:28 -04:00
committed by GitHub
parent 6c00ac43fc
commit 3c18fd7636
225 changed files with 2406 additions and 2406 deletions

View File

@@ -29,7 +29,7 @@ namespace Bit.iOS.Extension
AddBarButton.TintColor = ThemeHelpers.NavBarTextColor;
CancelBarButton.TintColor = ThemeHelpers.NavBarTextColor;
NavItem.Title = AppResources.Items;
if(!CanAutoFill())
if (!CanAutoFill())
{
CancelBarButton.Title = AppResources.Close;
}
@@ -45,7 +45,7 @@ namespace Bit.iOS.Extension
public bool CanAutoFill()
{
if(Context.ProviderType != Constants.UTTypeAppExtensionFillBrowserAction
if (Context.ProviderType != Constants.UTTypeAppExtensionFillBrowserAction
&& Context.ProviderType != Constants.UTTypeAppExtensionFillWebViewAction
&& Context.ProviderType != UTType.PropertyList)
{
@@ -67,9 +67,9 @@ namespace Bit.iOS.Extension
public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
{
if(segue.DestinationViewController is UINavigationController navController)
if (segue.DestinationViewController is UINavigationController navController)
{
if(navController.TopViewController is LoginAddViewController addLoginController)
if (navController.TopViewController is LoginAddViewController addLoginController)
{
addLoginController.Context = Context;
addLoginController.LoginListController = this;
@@ -101,37 +101,37 @@ namespace Bit.iOS.Extension
tableView.DeselectRow(indexPath, true);
tableView.EndEditing(true);
if(Items == null || Items.Count() == 0)
if (Items == null || Items.Count() == 0)
{
_controller.PerformSegue("loginAddSegue", this);
return;
}
var item = Items.ElementAt(indexPath.Row);
if(item == null)
if (item == null)
{
_controller.LoadingController.CompleteRequest(null, null);
return;
}
if(_controller.CanAutoFill() && !string.IsNullOrWhiteSpace(item.Password))
if (_controller.CanAutoFill() && !string.IsNullOrWhiteSpace(item.Password))
{
string totp = null;
var storageService = ServiceContainer.Resolve<IStorageService>("storageService");
var disableTotpCopy = storageService.GetAsync<bool?>(
Bit.Core.Constants.DisableAutoTotpCopyKey).GetAwaiter().GetResult();
if(!disableTotpCopy.GetValueOrDefault(false))
if (!disableTotpCopy.GetValueOrDefault(false))
{
totp = GetTotpAsync(item).GetAwaiter().GetResult();
}
_controller.LoadingController.CompleteUsernamePasswordRequest(
item.Id, item.Username, item.Password, item.Fields, totp);
}
else if(!string.IsNullOrWhiteSpace(item.Username) || !string.IsNullOrWhiteSpace(item.Password) ||
else if (!string.IsNullOrWhiteSpace(item.Username) || !string.IsNullOrWhiteSpace(item.Password) ||
!string.IsNullOrWhiteSpace(item.Totp))
{
var sheet = Dialogs.CreateActionSheet(item.Name, _controller);
if(!string.IsNullOrWhiteSpace(item.Username))
if (!string.IsNullOrWhiteSpace(item.Username))
{
sheet.AddAction(UIAlertAction.Create(AppResources.CopyUsername, UIAlertActionStyle.Default, a =>
{
@@ -144,7 +144,7 @@ namespace Bit.iOS.Extension
});
}));
}
if(!string.IsNullOrWhiteSpace(item.Password))
if (!string.IsNullOrWhiteSpace(item.Password))
{
sheet.AddAction(UIAlertAction.Create(AppResources.CopyPassword, UIAlertActionStyle.Default, a =>
{
@@ -158,13 +158,13 @@ namespace Bit.iOS.Extension
});
}));
}
if(!string.IsNullOrWhiteSpace(item.Totp))
if (!string.IsNullOrWhiteSpace(item.Totp))
{
sheet.AddAction(UIAlertAction.Create(AppResources.CopyTotp, UIAlertActionStyle.Default,
async a =>
{
var totp = await GetTotpAsync(item);
if(string.IsNullOrWhiteSpace(totp))
if (string.IsNullOrWhiteSpace(totp))
{
return;
}