新增同步房间礼物特效状态到 TurboModeStateManager 的逻辑,确保房间设置更新时正确传递特效状态,并记录相关日志以便调试。

This commit is contained in:
edwinQQQ
2025-09-17 18:55:17 +08:00
parent ab5b704866
commit b446deb18f

View File

@@ -34,6 +34,8 @@
///VC
#import "XPRoomTagListViewController.h"
#import "XPRoomRoleViewController.h"
///Manager
#import "TurboModeStateManager.h"
#import "UploadFile.h"
@@ -595,6 +597,12 @@ XPRoomSettingItemModel * itemModel = [[self.datasource xpSafeObjectAtIndex:index
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
[self.presenter getRoomInfo:roomUid];
if (itemType == RoomSettingItemType_Gift_Effect) {
// 🔧 TurboModeStateManager
NSString *roomId = @(roomInfo.roomId).stringValue;
[[TurboModeStateManager sharedManager] updateGiftEffectsForRoom:roomId enabled:roomInfo.hasAnimationEffect];
NSLog(@"🎮 XPRoomSettingViewController: 房间礼物特效状态已同步到TurboModeStateManager - 房间ID: %@, hasAnimationEffect: %@",
roomId, roomInfo.hasAnimationEffect ? @"开启" : @"关闭");
NSString *sessionID = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
AttachmentModel *attachement = [[AttachmentModel alloc]init];
attachement.first = CustomMessageType_Update_RoomInfo;