feat: 先改变节点选择方法
Some checks failed
Build Windows / build (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Has been cancelled

This commit is contained in:
speakeloudest 2025-11-14 20:18:38 -08:00
parent 670eb7ebc9
commit 89d6ec3c76

View File

@ -79,8 +79,8 @@ class HINodeListView extends GetView<HINodeListController> {
// //
return Material( return Material(
color: Colors.transparent, color: Colors.transparent,
// child: _buildSubscribeList(context) child: _buildSubscribeList(context)
child: _kr_buildRegionList(context) // child: _kr_buildRegionList(context)
); );
} }
@ -235,10 +235,19 @@ class HINodeListView extends GetView<HINodeListController> {
_buildEmptyListPlaceholder(context, AppTranslations.kr_home.noNodes) _buildEmptyListPlaceholder(context, AppTranslations.kr_home.noNodes)
else ...[ else ...[
InkWell( InkWell(
onTap: () { // 🔧 async
controller.homeController.kr_selectNode('auto'); onTap: () async {
try {
final success =
await controller.homeController.kr_performNodeSwitch('auto');
if (success) {
controller.homeController.kr_currentListStatus.value = controller.homeController.kr_currentListStatus.value =
KRHomeViewsListStatus.kr_none; KRHomeViewsListStatus.kr_none;
}
} catch (e) {
KRLogUtil.kr_e('Auto选项切换异常: $e',
tag: 'NodeListView');
}
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(