mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-10-05 14:41:33 +00:00
Rework pwman list
This commit is contained in:
21 files changed
+65
-37
No files matched your search
@@ -29,6 +29,10 @@ public interface PasswordManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
default boolean preferListIds() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default List<ListEntry> listKeys() {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@@ -37,4 +37,9 @@ public class PasswordManagerKeyList {
|
||||
cachedPasswordManagerClass = pwman.getClass();
|
||||
return l;
|
||||
}
|
||||
|
||||
public static synchronized void clear() {
|
||||
cachedPasswordManagerClass = null;
|
||||
cached = null;
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,9 @@ public class PasswordManagerTestComp extends SimpleRegionBuilder {
|
||||
}
|
||||
|
||||
protected void selectFromList(PasswordManager.ListEntry entry) {
|
||||
value.setValue(entry.getKey());
|
||||
var pwman = AppPrefs.get().passwordManager().getValue();
|
||||
var preferId = pwman != null && pwman.preferListIds();
|
||||
value.setValue(preferId && entry.getInternalId() != null ? entry.getInternalId() : entry.getKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user