Solve ssh connect slow

This commit is contained in:
Junyuan Feng
2022-01-11 12:19:17 +08:00
parent 4d227c3f00
commit 340a7641e6
6 changed files with 52 additions and 10 deletions

View File

@@ -15,6 +15,11 @@ class PrivateKeyStore extends PersistentStore {
json.decode(box.get('key', defaultValue: '[]')!));
}
PrivateKeyInfo get(String id) {
final ss = fetch();
return ss.firstWhere((e) => e.id == id);
}
void delete(PrivateKeyInfo s) {
final ss = fetch();
ss.removeAt(index(s));