Skip to content

Commit 50dd64e

Browse files
committed
cache
1 parent 07c1bf6 commit 50dd64e

3 files changed

Lines changed: 325 additions & 189 deletions

File tree

lib/providers/action.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ class SetupAction extends _$SetupAction {
395395
patchConfig: realPatchConfig,
396396
);
397397
final yamlString = vm2.a;
398-
if (yamlString.isEmpty) return;
399398
final yamlMd5 = vm2.b;
400399
if (yamlMd5 == globalState.lastConfigMd5 && force == false) return;
401400
await globalState.loadingRun(
@@ -408,7 +407,9 @@ class SetupAction extends _$SetupAction {
408407
params: _setupParams,
409408
preloadInvoke: preloadInvoke,
410409
);
411-
if (message.isNotEmpty) throw message;
410+
if (message.isNotEmpty && !message.endsWith('is empty')) {
411+
throw message;
412+
}
412413
ref.read(checkIpNumProvider.notifier).add();
413414
await onUpdated?.call();
414415
},
@@ -876,6 +877,7 @@ class ProfilesAction extends _$ProfilesAction {
876877
void putProfile(Profile profile) {
877878
ref.read(profilesProvider.notifier).put(profile);
878879
if (ref.read(currentProfileIdProvider) != null) return;
880+
print('update===>data');
879881
ref.read(currentProfileIdProvider.notifier).value = profile.id;
880882
}
881883

0 commit comments

Comments
 (0)