diff --git a/src/App/Pages/Vault/AddEditPage.xaml b/src/App/Pages/Vault/AddEditPage.xaml
index 17baf8a26..16d2cfd99 100644
--- a/src/App/Pages/Vault/AddEditPage.xaml
+++ b/src/App/Pages/Vault/AddEditPage.xaml
@@ -16,8 +16,15 @@
-
-
+
+
@@ -512,7 +519,7 @@
-
+
@@ -528,14 +535,13 @@
StyleClass="box-value" />
-
+
+ IsVisible="{Binding HasCollections, Converter={StaticResource inverseBool}}">
diff --git a/src/App/Pages/Vault/AddEditPage.xaml.cs b/src/App/Pages/Vault/AddEditPage.xaml.cs
index 5148bb3bb..6c51a4ec7 100644
--- a/src/App/Pages/Vault/AddEditPage.xaml.cs
+++ b/src/App/Pages/Vault/AddEditPage.xaml.cs
@@ -23,6 +23,11 @@ namespace Bit.App.Pages
_vm.Type = type;
_vm.Init();
SetActivityIndicator();
+ if(!_vm.EditMode)
+ {
+ ToolbarItems.Remove(_attachmentsItem);
+ ToolbarItems.Remove(_deleteItem);
+ }
_typePicker.ItemDisplayBinding = new Binding("Key");
_cardBrandPicker.ItemDisplayBinding = new Binding("Key");
@@ -36,7 +41,7 @@ namespace Bit.App.Pages
{
base.OnAppearing();
await LoadOnAppearedAsync(_scrollView, true, () => _vm.LoadAsync());
- if(Device.RuntimePlatform == Device.Android)
+ if(_vm.EditMode && Device.RuntimePlatform == Device.Android)
{
if(_vm.Cipher.OrganizationId == null)
{
diff --git a/src/App/Pages/Vault/AddEditPageViewModel.cs b/src/App/Pages/Vault/AddEditPageViewModel.cs
index afddb0d19..61143d660 100644
--- a/src/App/Pages/Vault/AddEditPageViewModel.cs
+++ b/src/App/Pages/Vault/AddEditPageViewModel.cs
@@ -41,7 +41,7 @@ namespace Bit.App.Pages
nameof(IsSecureNote),
nameof(ShowUris),
nameof(ShowAttachments),
- nameof(ShowIdentityAddress),
+ nameof(ShowCollections),
};
private List> _matchDetectionOptions =
new List>
@@ -242,18 +242,19 @@ namespace Bit.App.Pages
public bool HasCollections
{
get => _hasCollections;
- set => SetProperty(ref _hasCollections, value);
+ set => SetProperty(ref _hasCollections, value,
+ additionalPropertyNames: new string[]
+ {
+ nameof(ShowCollections)
+ });
}
+ public bool ShowCollections => !EditMode && Cipher.OrganizationId != null;
public bool EditMode => !string.IsNullOrWhiteSpace(CipherId);
public bool IsLogin => Cipher?.Type == CipherType.Login;
public bool IsIdentity => Cipher?.Type == CipherType.Identity;
public bool IsCard => Cipher?.Type == CipherType.Card;
public bool IsSecureNote => Cipher?.Type == CipherType.SecureNote;
public bool ShowUris => IsLogin && Cipher.Login.HasUris;
- public bool ShowIdentityAddress => IsIdentity && (
- !string.IsNullOrWhiteSpace(Cipher.Identity.Address1) ||
- !string.IsNullOrWhiteSpace(Cipher.Identity.City) ||
- !string.IsNullOrWhiteSpace(Cipher.Identity.Country));
public bool ShowAttachments => Cipher.HasAttachments;
public string ShowPasswordIcon => ShowPassword ? "" : "";
public string ShowCardCodeIcon => ShowCardCode ? "" : "";