fix URL has two "Open URL" context menu entries

This commit is contained in:
Philipp Crocoll
2021-03-08 09:49:21 +01:00
parent 9eab59dcbe
commit 7037fbfe94

View File

@@ -888,9 +888,10 @@ namespace keepass2android
popupItems.Add(new CopyToClipboardPopupMenuIcon(this, _stringViews[fieldKey]));
if (isProtected)
popupItems.Add(new ToggleVisibilityPopupMenuItem(this));
if (_stringViews[fieldKey].Text.StartsWith(KeePass.AndroidAppScheme)
if (fieldKey != PwDefs.UrlField //url already has a go-to-url menu
&& (_stringViews[fieldKey].Text.StartsWith(KeePass.AndroidAppScheme)
|| _stringViews[fieldKey].Text.StartsWith("http://")
|| _stringViews[fieldKey].Text.StartsWith("https://"))
|| _stringViews[fieldKey].Text.StartsWith("https://")))
{
popupItems.Add(new GotoUrlMenuItem(this, fieldKey));
}