优化使用体验

This commit is contained in:
jyuesong
2022-06-07 19:32:39 +08:00
parent 9759caf9b8
commit b89de1414a
4 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ class ConfigViewModel extends BaseViewModel {
Map<String, String> content = {};
Future<void> loadData([isLoading = true]) async {
if (isLoading) {
if (isLoading && list.isEmpty) {
loading(notify: true);
}

View File

@ -17,7 +17,7 @@ class EnvViewModel extends BaseViewModel {
Future<void> loadData([isLoading = true]) async {
if (isLoading) {
if (isLoading && list.isEmpty) {
loading(notify: true);
}

View File

@ -15,7 +15,7 @@ class DependencyViewModel extends BaseViewModel {
List<DependencyBean> linuxList = [];
Future<void> loadData(String type, [bool showLoading = true]) async {
if (showLoading) {
if (showLoading && ((type == "nodejs" && nodeJsList.isEmpty) || (type == "python3" && python3List.isEmpty) || (type == "linux" && linuxList.isEmpty))) {
loading(notify: true);
}

View File

@ -20,7 +20,7 @@ class TaskViewModel extends BaseViewModel {
List<TaskBean> disabled = [];
Future<void> loadData([isLoading = true]) async {
if (isLoading) {
if (isLoading && list.isEmpty) {
loading(notify: true);
}