Example #1
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            if (!_connectivity.IsConnected)
            {
                AlertNoConnection();
            }

            PasswordCell?.InitEvents();
            UsernameCell?.InitEvents();
            UriCell?.InitEvents();
            NameCell?.InitEvents();
            NotesCell?.InitEvents();
            FolderCell?.InitEvents();

            if (PasswordCell?.Button != null)
            {
                PasswordCell.Button.Clicked += PasswordButton_Clicked;
            }
            if (GenerateCell != null)
            {
                GenerateCell.Tapped += GenerateCell_Tapped;
            }
            if (DeleteCell != null)
            {
                DeleteCell.Tapped += DeleteCell_Tapped;
            }
        }
Example #2
0
        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            PasswordCell?.Dispose();
            TotpCell?.Dispose();
            UsernameCell?.Dispose();
            UriCell?.Dispose();
            NameCell?.Dispose();
            NotesCell?.Dispose();
            FolderCell?.Dispose();

            if (PasswordCell?.Button != null)
            {
                PasswordCell.Button.Clicked -= PasswordButton_Clicked;
            }
            if (TotpCell?.Button != null)
            {
                TotpCell.Button.Clicked -= TotpButton_Clicked;
            }
            if (GenerateCell != null)
            {
                GenerateCell.Tapped -= GenerateCell_Tapped;
            }
            if (DeleteCell != null)
            {
                DeleteCell.Tapped -= DeleteCell_Tapped;
            }
        }
Example #3
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            if (!_connectivity.IsConnected)
            {
                AlertNoConnection();
            }

            PasswordCell.InitEvents();
            UsernameCell.InitEvents();
            UriCell.InitEvents();
            NameCell.InitEvents();
            NotesCell.InitEvents();
            FolderCell.InitEvents();
            PasswordCell.Button.Clicked += PasswordButton_Clicked;
            GenerateCell.Tapped         += GenerateCell_Tapped;

            if (!_fromAutofill && !_settings.GetValueOrDefault(AddedLoginAlertKey, false))
            {
                _settings.AddOrUpdateValue(AddedLoginAlertKey, true);
                if (Device.OS == TargetPlatform.iOS)
                {
                    DisplayAlert(AppResources.BitwardenAppExtension, AppResources.BitwardenAppExtensionAlert,
                                 AppResources.Ok);
                }
                else if (Device.OS == TargetPlatform.Android && !_appInfoService.AutofillServiceEnabled)
                {
                    DisplayAlert(AppResources.BitwardenAutofillService, AppResources.BitwardenAutofillServiceAlert,
                                 AppResources.Ok);
                }
            }
        }
Example #4
0
 protected override void OnDisappearing()
 {
     base.OnDisappearing();
     PasswordCell.Dispose();
     UsernameCell.Dispose();
     UriCell.Dispose();
     NameCell.Dispose();
     NotesCell.Dispose();
     FolderCell.Dispose();
     PasswordCell.Button.Clicked -= PasswordButton_Clicked;
     GenerateCell.Tapped         -= GenerateCell_Tapped;
 }