1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

app options for add/edit page

This commit is contained in:
Kyle Spearrin
2019-05-17 12:03:35 -04:00
parent c77d4b795a
commit 9d491a3636
9 changed files with 197 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
using Bit.Core.Enums;
using Bit.App.Models;
using Bit.Core.Enums;
using System.Collections.Generic;
using Xamarin.Forms;
@@ -7,13 +8,16 @@ namespace Bit.App.Pages
public partial class AddEditPage : BaseContentPage
{
private AddEditPageViewModel _vm;
private readonly AppOptions _appOptions;
public AddEditPage(
string cipherId = null,
CipherType? type = null,
string folderId = null,
string collectionId = null)
string collectionId = null,
AppOptions appOptions = null)
{
_appOptions = appOptions;
InitializeComponent();
_vm = BindingContext as AddEditPageViewModel;
_vm.Page = this;
@@ -40,7 +44,7 @@ namespace Bit.App.Pages
protected override async void OnAppearing()
{
base.OnAppearing();
await LoadOnAppearedAsync(_scrollView, true, () => _vm.LoadAsync());
await LoadOnAppearedAsync(_scrollView, true, () => _vm.LoadAsync(_appOptions));
if(_vm.EditMode && Device.RuntimePlatform == Device.Android)
{
if(_vm.Cipher.OrganizationId == null)