mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-15 13:47:21 +00:00
Added new config screen and buttons for navigation
This commit is contained in:
parent
d0505a4a58
commit
af8834f7bd
8 changed files with 267 additions and 84 deletions
|
|
@ -54,8 +54,18 @@ class Config implements ConfigRepo {
|
|||
|
||||
Future<ConnectionConfig> get connectionConfig async {
|
||||
_checkIfPasswordMatched();
|
||||
return ConnectionConfig.fromJson(
|
||||
json.decode(await _storage.read(key: _keyConnectionConfig)));
|
||||
final connConfig = await _storage.read(key: _keyConnectionConfig);
|
||||
|
||||
if (connConfig == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ConnectionConfig.fromJson(json.decode(connConfig));
|
||||
}
|
||||
|
||||
Future<void> deleteAll() {
|
||||
_checkIfPasswordMatched();
|
||||
return _storage.deleteAll();
|
||||
}
|
||||
|
||||
void _checkIfPasswordMatched() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue