Browse Source

fix(live): 修复直播间加入频道ID及界面显示问题

- 更新了discover页面中joinChannel的频道ID参数
- 优化了live_room_notice_chat_panel中的条件判断逻辑
- 修复了isLive状态下的颜色渐变显示问题
- 添加了调试日志输出以追踪isLive状态变化
ios
Jolie 4 months ago
parent
commit
1fd9e86c9a
2 changed files with 4 additions and 3 deletions
  1. 2
      lib/pages/discover/discover_page.dart
  2. 5
      lib/widget/live/live_room_notice_chat_panel.dart

2
lib/pages/discover/discover_page.dart

@ -166,7 +166,7 @@ class _LiveItemState extends State<LiveItem> {
return InkWell(
onTap: () async{
// Get.to(() => LiveRoomPage(id: 0));
await roomController.joinChannel('1190127527251808256');
await roomController.joinChannel('1190132654775865344');
},
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(10.w)),

5
lib/widget/live/live_room_notice_chat_panel.dart

@ -77,7 +77,8 @@ class _LiveRoomNoticeChatPanelState extends State<LiveRoomNoticeChatPanel> {
SizedBox(width: 18.w),
Obx((){
if(controller.rtcChannelDetail.value?.maleInfo == null && GlobalData().userData?.genderCode == 0 && controller.currentRole != CurrentRole.broadcaster ||
controller.rtcChannelDetail.value?.femaleInfo == null && GlobalData().userData?.genderCode == 1 && controller.currentRole != CurrentRole.broadcaster){
controller.rtcChannelDetail.value?.femaleInfo == null && GlobalData().userData?.genderCode == 1 && controller.currentRole != CurrentRole.broadcaster || controller.isLive){
Get.log('${controller.isLive}');
return Container(
width: 120.w,
height: 55.w,
@ -85,7 +86,7 @@ class _LiveRoomNoticeChatPanelState extends State<LiveRoomNoticeChatPanel> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.w),
gradient: LinearGradient(
colors: controller.isLive ? [Colors.grey] : [Color(0xFF7C63FF), Color(0xFF987CFF)],
colors: controller.isLive ? [Colors.grey, Colors.grey] : [Color(0xFF7C63FF), Color(0xFF987CFF)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),

Loading…
Cancel
Save