fix: auto reload after restoring
This commit is contained in:
@@ -6,7 +6,7 @@ class PrivateKeyProvider extends ChangeNotifier {
|
||||
List<PrivateKeyInfo> get pkis => _pkis;
|
||||
late List<PrivateKeyInfo> _pkis;
|
||||
|
||||
void loadData() {
|
||||
void load() {
|
||||
_pkis = Stores.key.fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class ServerProvider extends ChangeNotifier {
|
||||
|
||||
Timer? _timer;
|
||||
|
||||
Future<void> loadLocalData() async {
|
||||
Future<void> load() async {
|
||||
// Issue #147
|
||||
// Clear all servers because of restarting app will cause duplicate servers
|
||||
_servers.clear();
|
||||
|
||||
@@ -13,7 +13,7 @@ class SnippetProvider extends ChangeNotifier {
|
||||
final _tags = <String>[];
|
||||
List<String> get tags => _tags;
|
||||
|
||||
void loadData() {
|
||||
void load() {
|
||||
_snippets = Stores.snippet.fetch();
|
||||
final order = Stores.setting.snippetOrder.fetch();
|
||||
if (order.isNotEmpty) {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 572;
|
||||
static const int build = 574;
|
||||
static const String engine = "3.13.5";
|
||||
static const String buildAt = "2023-09-23 11:12:55";
|
||||
static const int modifications = 2;
|
||||
static const String buildAt = "2023-09-24 15:49:22";
|
||||
static const int modifications = 12;
|
||||
static const int script = 18;
|
||||
}
|
||||
|
||||
@@ -17,4 +17,10 @@ class Providers {
|
||||
static final server = locator<ServerProvider>();
|
||||
static final sftp = locator<SftpProvider>();
|
||||
static final snippet = locator<SnippetProvider>();
|
||||
|
||||
static void reload() {
|
||||
key.load();
|
||||
server.load();
|
||||
snippet.load();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user