Some improvements

This commit is contained in:
Juan Gilsanz Polo 2022-10-23 19:27:23 +02:00
parent d57572cc56
commit c3690902c8
7 changed files with 355 additions and 393 deletions

View file

@ -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) {