联网失败时新增错误描述

This commit is contained in:
xkeyC 2023-12-09 12:49:08 +08:00
parent eee1bfdeb0
commit 1ed1af4453
3 changed files with 7 additions and 4 deletions

View File

@ -18,7 +18,7 @@ import 'package:window_manager/window_manager.dart';
import '../base/ui.dart'; import '../base/ui.dart';
class AppConf { class AppConf {
static const String appVersion = "2.10.0 Beta"; static const String appVersion = "2.10.0+1 Beta";
static const int appVersionCode = 35; static const int appVersionCode = 35;
static const String appVersionDate = "2023-12-06"; static const String appVersionDate = "2023-12-06";

View File

@ -17,15 +17,18 @@ class AppGlobalUIModel extends BaseUIModel {
Timer? activityThemeColorTimer; Timer? activityThemeColorTimer;
Future<bool> doCheckUpdate(BuildContext context, {bool init = true}) async { Future<bool> doCheckUpdate(BuildContext context, {bool init = true}) async {
dynamic checkUpdateError;
if (!init) { if (!init) {
try { try {
await AppConf.checkUpdate(); await AppConf.checkUpdate();
} catch (_) {} } catch (e) {
checkUpdateError = e;
}
} }
await Future.delayed(const Duration(milliseconds: 100)); await Future.delayed(const Duration(milliseconds: 100));
if (AppConf.networkVersionData == null) { if (AppConf.networkVersionData == null) {
showToast(context, showToast(context,
"检查更新失败!请检查网络连接... \n进入离线模式.. \n\n请谨慎在离线模式中使用。 \n当前版本构建日期:${AppConf.appVersionDate}\n QQ群940696487"); "检查更新失败!请检查网络连接... \n进入离线模式.. \n\n请谨慎在离线模式中使用。 \n当前版本构建日期:${AppConf.appVersionDate}\n QQ群940696487 \n错误信息:$checkUpdateError");
return false; return false;
} }
final lastVersion = AppConf.isMSE final lastVersion = AppConf.isMSE

View File

@ -132,7 +132,7 @@ msix_config:
publisher_display_name: xkeyC Studio publisher_display_name: xkeyC Studio
identity_name: 56575xkeyC.MSE identity_name: 56575xkeyC.MSE
publisher: CN=B54C897B-C263-4680-B6AB-4913C603DF87 publisher: CN=B54C897B-C263-4680-B6AB-4913C603DF87
msix_version: 2.9.22.0 msix_version: 2.10.0.0
logo_path: ./assets/app_logo.png logo_path: ./assets/app_logo.png
capabilities: internetClient,allowElevation capabilities: internetClient,allowElevation
languages: zh-cn languages: zh-cn