feat: 先改变节点选择方法
This commit is contained in:
parent
670eb7ebc9
commit
89d6ec3c76
@ -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 {
|
||||||
controller.homeController.kr_currentListStatus.value =
|
try {
|
||||||
KRHomeViewsListStatus.kr_none;
|
final success =
|
||||||
|
await controller.homeController.kr_performNodeSwitch('auto');
|
||||||
|
if (success) {
|
||||||
|
controller.homeController.kr_currentListStatus.value =
|
||||||
|
KRHomeViewsListStatus.kr_none;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
KRLogUtil.kr_e('Auto选项切换异常: $e',
|
||||||
|
tag: 'NodeListView');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user