diff --git a/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_logic.dart b/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_logic.dart index 72f56be1..6b45b55c 100644 --- a/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_logic.dart +++ b/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_logic.dart @@ -28,11 +28,6 @@ class ThirdPartyPlatformLogic extends BaseGetXController { void onReady() async { super.onReady(); await getActivateInfo(); - // 恢复之前保存的选中状态 - // final savedIndex = await state.getSavedSelectedPlatformIndex(); - // if (savedIndex != null && savedIndex < state.platFormSet.length) { - // state.selectPlatFormIndex.value = savedIndex; - // } _initReplySubscription(); await getServerDatetime(); showEasyLoading(); @@ -214,9 +209,7 @@ class ThirdPartyPlatformLogic extends BaseGetXController { void savePlatFormSetting() { if (state.selectPlatFormIndex.value == 1 || state.selectPlatFormIndex.value == 0) { if (state.registerKey.isNotEmpty) { - // 持久化保存选项 - // state.saveSelectedPlatformIndex(state.selectPlatFormIndex.value); - // _requestAuthorizationCode(); + _requestAuthorizationCode(); } } else { showToast('目前只支持切换至涂鸦智能、锁通通协议'.tr); diff --git a/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_state.dart b/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_state.dart index 13421d95..c26002c4 100644 --- a/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_state.dart +++ b/lib/main/lockDetail/lockSet/thirdPartyPlatform/third_party_platform_state.dart @@ -2,7 +2,6 @@ import 'dart:ui'; import 'package:get/get.dart'; import 'package:get/get_rx/get_rx.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:star_lock/main/lockDetail/lockDetail/ActivateInfoResponse.dart'; import 'package:star_lock/main/lockDetail/lockSet/lockSet/lockSetInfo_entity.dart'; import 'package:star_lock/translations/app_dept.dart'; @@ -33,16 +32,4 @@ class ThirdPartyPlatformState { Map lockInfo = {}; int serverTime = 0; // 服务器时间即UTC+0时间 - - // 存储选中的平台索引 - // static const String _SELECTED_PLATFORM_INDEX_KEY = 'selected_platform_index'; - // Future saveSelectedPlatformIndex(int index) async { - // final prefs = await SharedPreferences.getInstance(); - // await prefs.setInt(_SELECTED_PLATFORM_INDEX_KEY, index); - // } - // // 从本地存储读取选中的平台索引 - // Future getSavedSelectedPlatformIndex() async { - // final prefs = await SharedPreferences.getInstance(); - // return prefs.getInt(_SELECTED_PLATFORM_INDEX_KEY); - // } }