feat: 先改变节点选择方法
This commit is contained in:
parent
670eb7ebc9
commit
89d6ec3c76
@ -79,8 +79,8 @@ class HINodeListView extends GetView<HINodeListController> {
|
||||
// 并设置透明背景,让父组件的背景可以透出来
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
// child: _buildSubscribeList(context)
|
||||
child: _kr_buildRegionList(context)
|
||||
child: _buildSubscribeList(context)
|
||||
// child: _kr_buildRegionList(context)
|
||||
);
|
||||
}
|
||||
|
||||
@ -235,10 +235,19 @@ class HINodeListView extends GetView<HINodeListController> {
|
||||
_buildEmptyListPlaceholder(context, AppTranslations.kr_home.noNodes)
|
||||
else ...[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
controller.homeController.kr_selectNode('auto');
|
||||
// 🔧 修复:改为 async,等待节点切换完成后再关闭列表
|
||||
onTap: () async {
|
||||
try {
|
||||
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(
|
||||
decoration: BoxDecoration(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user