mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Some improvements
This commit is contained in:
parent
d57572cc56
commit
c3690902c8
7 changed files with 355 additions and 393 deletions
|
@ -50,11 +50,6 @@ class ServersProvider with ChangeNotifier {
|
|||
data: null
|
||||
);
|
||||
|
||||
final Encryption _encryptionSettings = Encryption(
|
||||
loadStatus: 0, // 0 = loading, 1 = loaded, 2 = error,
|
||||
data: null
|
||||
);
|
||||
|
||||
FilteringStatus? _filteringStatus;
|
||||
|
||||
List<Server> get serversList {
|
||||
|
@ -97,10 +92,6 @@ class ServersProvider with ChangeNotifier {
|
|||
return _dnsInfo;
|
||||
}
|
||||
|
||||
Encryption get encryptionSettings {
|
||||
return _encryptionSettings;
|
||||
}
|
||||
|
||||
void setDbInstance(Database db) {
|
||||
_dbInstance = db;
|
||||
}
|
||||
|
@ -211,18 +202,6 @@ class ServersProvider with ChangeNotifier {
|
|||
}
|
||||
}
|
||||
|
||||
void setEncryptionSettings(EncryptionData data) {
|
||||
_encryptionSettings.data = data;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setEncryptionSettingsLoadStatus(int status, bool notify) {
|
||||
_encryptionSettings.loadStatus = status;
|
||||
if (notify == true) {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> createServer(Server server) async {
|
||||
final saved = await saveServerIntoDb(server);
|
||||
if (saved == true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue