Browse Source

移除iOS entitlements中未使用的homekit权限并更新关联域名。

weicu
lxm 1 year ago
parent
commit
ee6d0038cc
  1. 4
      ios/Runner/Runner.entitlements
  2. 16
      lib/modules/settings/controllers/settings_controller.dart

4
ios/Runner/Runner.entitlements

@ -4,10 +4,8 @@
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:deepsoud.com</string>
<string>applinks:voitrans.net</string>
</array>
<key>com.apple.developer.homekit</key>
<true/>
<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.external-accessory.wireless-configuration</key>

16
lib/modules/settings/controllers/settings_controller.dart

@ -124,6 +124,7 @@ class SettingsController extends GetxController {
final buildNumber = ''.obs;
bool isCheckingUpdate = false; //状态锁,防止重复检查
DateTime? lastCheckTime; // 添加上次检查时间记录
// 权限相关
// 权限组,用于在UI中显示
@ -479,8 +480,23 @@ class SettingsController extends GetxController {
/// 手动检查版本更新
Future<void> checkForUpdate() async {
// 检查是否在2秒内重复调用
final now = DateTime.now();
if (lastCheckTime != null && now.difference(lastCheckTime!).inSeconds < 2) {
// 在2秒内重复调用,直接返回
// Get.snackbar(
// 'checkUpdate'.tr,
// 'checkUpdateTooFrequent'.tr, // 检查更新过于频繁,请稍后再试
// snackPosition: SnackPosition.TOP,
// backgroundColor: Colors.orange.withValues(alpha: 0.8),
// colorText: Colors.white,
// );
return;
}
if (isCheckingUpdate) return;
isCheckingUpdate = true;
lastCheckTime = now; // 记录本次检查时间
// 用于跟踪我们的对话框
bool dialogShown = false;

Loading…
Cancel
Save