- fix: same name snippet caused err
- fix: auto load servers from db after restoring
This commit is contained in:
lollipopkit
2023-09-24 14:51:51 +08:00
parent 5a9fd74470
commit 1194a87c76
9 changed files with 74 additions and 81 deletions

View File

@@ -42,8 +42,8 @@ class ServerProvider extends ChangeNotifier {
_serverOrder.clear();
final spis = Stores.server.fetch();
for (final spi in spis) {
_servers[spi.id] = genServer(spi);
for (int idx = 0; idx < spis.length; idx++) {
_servers[spis[idx].id] = genServer(spis[idx]);
}
final serverOrder_ = Stores.setting.serverOrder.fetch();
if (serverOrder_.isNotEmpty) {

View File

@@ -31,7 +31,7 @@ class SnippetProvider extends ChangeNotifier {
}
void _addInternal() {
if (!Stores.setting.fTISBM.fetch()) {
if (!Stores.setting.fTISBM.fetch() || _snippets.isNotEmpty) {
return;
}
_snippets.add(installSBM);

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 570;
static const int build = 572;
static const String engine = "3.13.5";
static const String buildAt = "2023-09-21 10:20:10";
static const int modifications = 4;
static const int script = 17;
static const String buildAt = "2023-09-23 11:12:55";
static const int modifications = 2;
static const int script = 18;
}