allow to show attachments for template entries

This commit is contained in:
Philipp Crocoll
2019-12-16 12:05:10 +01:00
parent 2290b35317
commit d697b93f6a
3 changed files with 26 additions and 11 deletions

View File

@@ -915,7 +915,12 @@ namespace keepass2android
item.SetVisible(false);
foreach (View v in _editModeHiddenViews)
v.Visibility = ViewStates.Visible;
return true;
State.EditMode.ShowAddAttachments = true;
ViewGroup binariesGroup = (ViewGroup)FindViewById(Resource.Id.binaries);
binariesGroup.Visibility = ViewStates.Visible;
FindViewById(Resource.Id.entry_binaries_container).Visibility = ViewStates.Visible;
return true;
case Android.Resource.Id.Home:
OnBackPressed();
return true;

View File

@@ -18,12 +18,18 @@ namespace keepass2android
return keys;
}
public virtual bool ShowAddAttachments
{
get { return true; }
}
protected bool? manualShowAddAttachments = null;
public virtual bool ShowAddExtras
public virtual bool ShowAddAttachments
{
get
{
if (manualShowAddAttachments != null) return (bool)manualShowAddAttachments;
return true; }
set { manualShowAddAttachments = value; }
}
public virtual bool ShowAddExtras
{
get { return true; }
}

View File

@@ -138,12 +138,16 @@ namespace keepass2android
return keys.OrderBy(s => s, c);
}
public override bool ShowAddAttachments
{
get { return false; }
}
public override bool ShowAddAttachments
{
get
{
if (manualShowAddAttachments != null) return (bool)manualShowAddAttachments;
return false;
}
}
public override bool ShowAddExtras
public override bool ShowAddExtras
{
get { return false; }
}