show entry notification when autofilling an entry with TOTP (to allow copying TOTP to clipboard)

fixes https://github.com/PhilippC/keepass2android/issues/1272
This commit is contained in:
Philipp Crocoll
2024-01-04 08:21:45 +01:00
parent 64355a3da7
commit 5edc070aa8
11 changed files with 248 additions and 79 deletions

View File

@@ -91,7 +91,29 @@ namespace keepass2android
}
private static String ExtractHost(String url)
public PwGroup SearchForUuid(Database database, string uuid)
{
SearchParameters sp = SearchParameters.None;
sp.SearchInUuids = true;
sp.SearchString = uuid;
if (sp.RegularExpression) // Validate regular expression
{
new Regex(sp.SearchString);
}
string strGroupName = _app.GetResourceString(UiStringKey.search_results);
PwGroup pgResults = new PwGroup(true, true, strGroupName, PwIcon.EMailSearch) { IsVirtual = true };
PwObjectList<PwEntry> listResults = pgResults.Entries;
database.Root.SearchEntries(sp, listResults, new NullStatusLogger());
return pgResults;
}
private static String ExtractHost(String url)
{
return UrlUtil.GetHost(url.Trim());
}

View File

@@ -174,10 +174,17 @@ namespace keepass2android
PwGroup group = SearchHelper.SearchForExactUrl(this, url);
return group;
}
public PwGroup SearchForHost(String url, bool allowSubdomains) {
}
public PwGroup SearchForUuid(String uuid)
{
PwGroup group = SearchHelper.SearchForUuid(this, uuid);
return group;
}
public PwGroup SearchForHost(String url, bool allowSubdomains) {
PwGroup group = SearchHelper.SearchForHost(this, url, allowSubdomains);
return group;