新增日志全局开关便于调试,优化部分机型可能出现的界面错乱或不显示等问题
(cherry picked from commit 5853ba7fe4e0cbe4f04b20c86e9fd84c5557139f)
This commit is contained in:
@@ -66,12 +66,22 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
||||
final isNotLoggedIn = controller.kr_currentViewStatus.value ==
|
||||
KRHomeViewsStatus.kr_notLoggedIn;
|
||||
|
||||
KRLogUtil.kr_i('构建默认视图', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('=' * 60, tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('🎨 构建默认视图', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('是否未登录: $isNotLoggedIn', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('是否有有效订阅: $hasValidSubscription', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('订阅列表数量: ${controller.kr_subscribeService.kr_availableSubscribes.length}', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('当前选中订阅: ${controller.kr_subscribeService.kr_currentSubscribe.value?.name ?? "null"}', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('是否试用: $isTrial', tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('当前高度: ${controller.kr_bottomPanelHeight.value}',
|
||||
tag: 'HomeBottomPanel');
|
||||
KRLogUtil.kr_i('当前高度: ${controller.kr_bottomPanelHeight.value}', tag: 'HomeBottomPanel');
|
||||
|
||||
// 🔧 新增:详细的 UI 渲染决策日志
|
||||
if (hasValidSubscription) {
|
||||
KRLogUtil.kr_i('✅ 将渲染: 连接信息卡片 (KRHomeConnectionInfoView)', tag: 'HomeBottomPanel');
|
||||
} else {
|
||||
KRLogUtil.kr_i('✅ 将渲染: 订阅卡片 (KRSubscriptionCard) - 开通会员界面', tag: 'HomeBottomPanel');
|
||||
}
|
||||
KRLogUtil.kr_i('=' * 60, tag: 'HomeBottomPanel');
|
||||
|
||||
// 🔧 关键修复:统一布局逻辑,确保无论登录状态如何都显示完整UI
|
||||
return Column(
|
||||
@@ -86,16 +96,22 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
||||
// 🔧 核心修复:无论登录状态,都显示核心卡片(订阅或连接信息)
|
||||
if (hasValidSubscription)
|
||||
// 已订阅:显示连接信息卡片
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 12.h),
|
||||
child: const KRHomeConnectionInfoView(),
|
||||
)
|
||||
Builder(builder: (context) {
|
||||
KRLogUtil.kr_i('🔹 渲染连接信息卡片,margin top: ${12.h}', tag: 'HomeBottomPanel');
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 12.h),
|
||||
child: const KRHomeConnectionInfoView(),
|
||||
);
|
||||
})
|
||||
else
|
||||
// 未订阅(包括未登录):始终显示订阅卡片
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 12.h, left: 12.w, right: 12.w),
|
||||
child: const KRSubscriptionCard(),
|
||||
),
|
||||
Builder(builder: (context) {
|
||||
KRLogUtil.kr_i('🔹 渲染订阅卡片,margin: top=${12.h}, left=${12.w}, right=${12.w}', tag: 'HomeBottomPanel');
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 12.h, left: 12.w, right: 12.w),
|
||||
child: const KRSubscriptionCard(),
|
||||
);
|
||||
}),
|
||||
|
||||
// 2. 如果已订阅且是试用,展示试用卡片
|
||||
if (hasValidSubscription && isTrial)
|
||||
|
||||
Reference in New Issue
Block a user