mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
优化使用体验
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
2
lib/module/env/env_viewmodel.dart
vendored
2
lib/module/env/env_viewmodel.dart
vendored
@ -17,7 +17,7 @@ class EnvViewModel extends BaseViewModel {
|
||||
|
||||
|
||||
Future<void> loadData([isLoading = true]) async {
|
||||
if (isLoading) {
|
||||
if (isLoading && list.isEmpty) {
|
||||
loading(notify: true);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user