新增 TurboModeStateManager 的功能,支持 CP 麦位开关状态管理,优化房间中各个视图对 Turbo 模式的集成。更新相关视图控制器以使用 TurboModeStateManager 获取和设置开关状态,提升代码可维护性和用户体验。同时,新增 CP 麦位相关的本地化字符串,确保多语言支持。
BIN
YuMi/Assets.xcassets/20.20.62/icon_turbo_mode_off.imageset/房间背景@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.6 KiB |
21
YuMi/Assets.xcassets/20.20.62/icon_turbo_mode_on.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "房间背景@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
21
YuMi/Assets.xcassets/20.20.62/room_layout_type_1.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "搜索@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/20.20.62/room_layout_type_1.imageset/搜索@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 2.5 KiB |
21
YuMi/Assets.xcassets/20.20.62/room_layout_type_2.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "搜索@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/20.20.62/room_layout_type_2.imageset/搜索@3x.png
vendored
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
YuMi/Assets.xcassets/20.20.62/room_level_top_1.imageset/5@3x.png
vendored
Normal file
After Width: | Height: | Size: 102 KiB |
21
YuMi/Assets.xcassets/20.20.62/room_level_top_1.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/20.20.62/room_level_top_2.imageset/5@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 85 KiB |
21
YuMi/Assets.xcassets/20.20.62/room_level_top_2.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x (1).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/20.20.62/room_level_top_3.imageset/5@3x (2).png
vendored
Normal file
After Width: | Height: | Size: 38 KiB |
21
YuMi/Assets.xcassets/20.20.62/room_level_top_3.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "5@3x (2).png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
@@ -18,8 +18,13 @@
|
||||
#import "AccountModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "XPLoginAuthCodeVC.h"
|
||||
///Manager
|
||||
#import "TurboModeStateManager.h"
|
||||
#import "FirstRechargeManager.h"
|
||||
#import "PublicRoomManager.h"
|
||||
///Tool
|
||||
#import "XNDJTDDLoadingTool.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
|
||||
@implementation PILoginManager
|
||||
+(void)loginWithVC:(MvpViewController *)VC isLoginPhone:(BOOL)isLoginPhone{
|
||||
@@ -90,5 +95,11 @@
|
||||
|
||||
// 初始化公共房间管理器
|
||||
[[PublicRoomManager sharedManager] initialize];
|
||||
|
||||
// 🔧 新增:启动 TurboModeStateManager
|
||||
NSString *userId = [[AccountInfoStorage instance] getUid];
|
||||
if (userId) {
|
||||
[[TurboModeStateManager sharedManager] startupWithCurrentUser:userId];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
@@ -425,8 +425,8 @@ TZImagePickerControllerDelegate>
|
||||
// 当 displayGIF 为 YES 时,允许显示 GIF 和视频文件
|
||||
NSString *filename = [asset valueForKey:@"filename"];
|
||||
BOOL isGIF = [filename containsString:@"GIF"];
|
||||
// BOOL isVideo = asset.mediaType == PHAssetMediaTypeVideo;
|
||||
return isGIF;// || isVideo;
|
||||
BOOL isVideo = asset.mediaType == PHAssetMediaTypeVideo;
|
||||
return isGIF || isVideo;
|
||||
} else {
|
||||
// 当 displayGIF 为 NO 时,只显示非 GIF 文件
|
||||
return ![[asset valueForKey:@"filename"] containsString:@"GIF"];
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#import <libpag/libpag.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import <UIImageView+WebCache.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "UIView+VAP.h"
|
||||
|
||||
@@ -79,7 +81,7 @@
|
||||
#import "SocialStageView.h"
|
||||
#import "MSRoomOnLineView.h"
|
||||
#import "XPTurboModeConstants.h"
|
||||
#import "../MoreView/Manager/TurboModeStateManager.h"
|
||||
#import "TurboModeStateManager.h"
|
||||
|
||||
#import "BannerScheduler.h"
|
||||
#import "GameBannerGestureManager.h"
|
||||
@@ -186,10 +188,7 @@ BannerSchedulerDelegate
|
||||
|
||||
@property (nonatomic, strong) UISwipeGestureRecognizer *swipeWhenPlayGame;
|
||||
|
||||
// 🔧 新增:Turbo Mode 开关状态
|
||||
@property (nonatomic, assign) BOOL turboGiftEffectsEnabled; // 临时礼物特效状态
|
||||
@property (nonatomic, assign) BOOL turboGlobalGiftScreenEnabled; // 全局礼物屏幕状态
|
||||
@property (nonatomic, assign) BOOL turboGlobalGameScreenEnabled; // 全局游戏屏幕状态
|
||||
// 🔧 移除:本地开关状态,改为使用 TurboModeStateManager
|
||||
@property (nonatomic, strong) NSString *currentRoomId; // 当前房间 ID
|
||||
|
||||
@end
|
||||
@@ -458,68 +457,24 @@ BannerSchedulerDelegate
|
||||
|
||||
// 🔧 新增:初始化Turbo Mode开关状态
|
||||
- (void)setupTurboModeSwitches {
|
||||
NSString *roomId = @(self.hostDelegate.getRoomInfo.roomId).stringValue;
|
||||
self.currentRoomId = roomId;
|
||||
// 🔧 修改:不再在这里设置房间ID,等待 TurboModeStateManager 设置
|
||||
// 如果 TurboModeStateManager 已经有当前房间ID,则使用它
|
||||
NSString *roomId = [[TurboModeStateManager sharedManager] loadCurrentRoomId];
|
||||
|
||||
// 1. 先按原逻辑获取状态
|
||||
[self loadSwitchStatesFromCache:roomId];
|
||||
|
||||
// 2. 再按 turbo mode 来调整状态
|
||||
[[TurboModeStateManager sharedManager] applyTurboModeToSwitchesForRoom:roomId];
|
||||
|
||||
// 3. 强制更新本地状态,确保与 turbo mode 一致
|
||||
[self forceUpdateLocalSwitchStates:roomId];
|
||||
|
||||
NSLog(@"🎮 RoomAnimationView Turbo Mode开关初始化完成 - 房间ID: %@", roomId);
|
||||
}
|
||||
|
||||
// 🔧 新增:从缓存加载开关状态
|
||||
- (void)loadSwitchStatesFromCache:(NSString *)roomId {
|
||||
// 礼物特效:从当前会话状态读取(不持久化)
|
||||
self.turboGiftEffectsEnabled = self.hostDelegate.getRoomInfo.hasAnimationEffect;
|
||||
|
||||
// 其他两个开关:从房间特定的 NSUserDefaults 读取(区分未设置与显式 NO)
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||
self.turboGlobalGiftScreenEnabled = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : YES;
|
||||
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||
self.turboGlobalGameScreenEnabled = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : YES;
|
||||
}
|
||||
|
||||
// 🔧 新增:更新本地开关状态
|
||||
- (void)updateLocalSwitchStates:(NSString *)roomId {
|
||||
NSDictionary *switchStates = [[TurboModeStateManager sharedManager] getSwitchStatesAfterTurboModeForRoom:roomId];
|
||||
|
||||
if (switchStates.count > 0) {
|
||||
self.turboGiftEffectsEnabled = [switchStates[@"giftEffects"] boolValue];
|
||||
self.turboGlobalGiftScreenEnabled = [switchStates[@"globalGiftScreen"] boolValue];
|
||||
self.turboGlobalGameScreenEnabled = [switchStates[@"globalGameScreen"] boolValue];
|
||||
if (roomId && roomId.length > 0) {
|
||||
self.currentRoomId = roomId;
|
||||
|
||||
NSLog(@"🎮 RoomAnimationView 开关状态已更新 - 礼物特效: %@, 全局礼物屏幕: %@, 全局游戏屏幕: %@",
|
||||
self.turboGiftEffectsEnabled ? @"开启" : @"关闭",
|
||||
self.turboGlobalGiftScreenEnabled ? @"开启" : @"关闭",
|
||||
self.turboGlobalGameScreenEnabled ? @"开启" : @"关闭");
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 新增:强制更新本地开关状态,确保与 turbo mode 一致
|
||||
- (void)forceUpdateLocalSwitchStates:(NSString *)roomId {
|
||||
// 直接获取 turbo mode 状态并强制设置
|
||||
BOOL turboModeEnabled = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||
|
||||
if (turboModeEnabled) {
|
||||
// turbo mode = YES,强制关闭所有开关
|
||||
self.turboGiftEffectsEnabled = NO;
|
||||
self.turboGlobalGiftScreenEnabled = NO;
|
||||
self.turboGlobalGameScreenEnabled = NO;
|
||||
// 更新礼物特效开关状态(基于房间信息)
|
||||
[[TurboModeStateManager sharedManager] updateGiftEffectsForRoom:roomId
|
||||
enabled:self.hostDelegate.getRoomInfo.hasAnimationEffect];
|
||||
|
||||
NSLog(@"🎮 RoomAnimationView 强制更新开关状态 - Turbo Mode 开启,所有开关已关闭");
|
||||
NSLog(@"🎮 RoomAnimationView Turbo Mode开关初始化完成 - 房间ID: %@", roomId);
|
||||
} else {
|
||||
// turbo mode = NO,使用原有逻辑
|
||||
[self updateLocalSwitchStates:roomId];
|
||||
NSLog(@"🎮 RoomAnimationView: 等待 TurboModeStateManager 设置房间ID");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 🔧 新增:设置Turbo Mode通知监听
|
||||
- (void)setupTurboModeNotifications {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
@@ -537,6 +492,17 @@ BannerSchedulerDelegate
|
||||
name:kTurboGlobalGameScreenEnabledChanged
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleTurboCpMicChanged:)
|
||||
name:kTurboCpMicEnabledChanged
|
||||
object:nil];
|
||||
|
||||
// 🔧 新增:监听当前房间ID设置通知
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleCurrentRoomIdSet:)
|
||||
name:kTurboCurrentRoomIdSet
|
||||
object:nil];
|
||||
|
||||
NSLog(@"🎮 Turbo Mode通知监听设置完成");
|
||||
}
|
||||
|
||||
@@ -632,8 +598,8 @@ BannerSchedulerDelegate
|
||||
effectPath:(NSString *)effectPath
|
||||
isCPEnter:(BOOL)isCP {
|
||||
|
||||
// 🔧 新增:Turbo Mode进房特效开关检查
|
||||
if (!self.turboGiftEffectsEnabled) {
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查进房特效开关
|
||||
if (![[TurboModeStateManager sharedManager] isGiftEffectsEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 Turbo Mode进房特效已关闭,跳过进房动画");
|
||||
return;
|
||||
}
|
||||
@@ -762,11 +728,11 @@ BannerSchedulerDelegate
|
||||
return;
|
||||
}
|
||||
|
||||
// 🔧 新增:Turbo Mode Banner开关检查
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查 Banner 开关
|
||||
if (obj.second == Custom_Message_Sub_General_Floating_Screen_One_Room ||
|
||||
obj.second == Custom_Message_Sub_General_Floating_Screen_All_Room) {
|
||||
// 游戏相关banner
|
||||
if (!self.turboGlobalGameScreenEnabled) {
|
||||
if (![[TurboModeStateManager sharedManager] isGlobalGameScreenEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 Turbo Mode全局游戏屏幕已关闭,跳过游戏banner");
|
||||
return;
|
||||
}
|
||||
@@ -774,7 +740,7 @@ BannerSchedulerDelegate
|
||||
obj.second == Custom_Message_Sub_Gift_ChannelNotify ||
|
||||
obj.second == Custom_Message_Sub_LuckyPackage) {
|
||||
// 礼物相关banner
|
||||
if (!self.turboGlobalGiftScreenEnabled) {
|
||||
if (![[TurboModeStateManager sharedManager] isGlobalGiftScreenEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 Turbo Mode全局礼物屏幕已关闭,跳过礼物banner");
|
||||
return;
|
||||
}
|
||||
@@ -978,8 +944,8 @@ BannerSchedulerDelegate
|
||||
}
|
||||
|
||||
- (void)receiveRoomGiftBanner:(AttachmentModel *)obj {
|
||||
// 🔧 新增:检查 Turbo Mode 全局礼物屏幕开关
|
||||
if (!self.turboGlobalGiftScreenEnabled) {
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查全局礼物屏幕开关
|
||||
if (![[TurboModeStateManager sharedManager] isGlobalGiftScreenEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 RoomAnimationView 全局礼物屏幕已关闭,跳过 RoomGiftBanner");
|
||||
return;
|
||||
}
|
||||
@@ -1010,8 +976,8 @@ BannerSchedulerDelegate
|
||||
}
|
||||
|
||||
- (void)receiveCPEvent:(AttachmentModel *)attachment {
|
||||
// 🔧 新增:检查 Turbo Mode 礼物特效开关
|
||||
if (!self.turboGiftEffectsEnabled) {
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查礼物特效开关
|
||||
if (![[TurboModeStateManager sharedManager] isGiftEffectsEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 RoomAnimationView 礼物特效已关闭,跳过CP动画");
|
||||
return;
|
||||
}
|
||||
@@ -1211,8 +1177,8 @@ BannerSchedulerDelegate
|
||||
}
|
||||
|
||||
- (void)receiveLuckGiftBanner:(AttachmentModel *)attachment {
|
||||
// 🔧 新增:检查 Turbo Mode 全局礼物屏幕开关
|
||||
if (!self.turboGlobalGiftScreenEnabled) {
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查全局礼物屏幕开关
|
||||
if (![[TurboModeStateManager sharedManager] isGlobalGiftScreenEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 RoomAnimationView 全局礼物屏幕已关闭,跳过 LuckyGiftWinningBanner");
|
||||
return;
|
||||
}
|
||||
@@ -1262,8 +1228,8 @@ BannerSchedulerDelegate
|
||||
}
|
||||
|
||||
- (void)receiveGameBanner:(AttachmentModel *)attachment {
|
||||
// 🔧 新增:检查 Turbo Mode 全局游戏屏幕开关
|
||||
if (!self.turboGlobalGameScreenEnabled) {
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查全局游戏屏幕开关
|
||||
if (![[TurboModeStateManager sharedManager] isGlobalGameScreenEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 RoomAnimationView 全局游戏屏幕已关闭,跳过 GameBanner");
|
||||
return;
|
||||
}
|
||||
@@ -1401,8 +1367,8 @@ BannerSchedulerDelegate
|
||||
|
||||
#pragma mark - Method: Send Gifts
|
||||
- (void)receiveGiftHandleSendGiftAnimationWith:(GiftReceiveInfoModel *)receiveInfo attachment:(AttachmentModel *)attachment {
|
||||
// 🔧 新增:检查 Turbo Mode 礼物特效开关
|
||||
if (!self.turboGiftEffectsEnabled) {
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 检查礼物特效开关
|
||||
if (![[TurboModeStateManager sharedManager] isGiftEffectsEnabledForRoom:self.currentRoomId]) {
|
||||
NSLog(@"🎮 RoomAnimationView 礼物特效已关闭,跳过动画");
|
||||
return;
|
||||
}
|
||||
@@ -4315,10 +4281,9 @@ BannerSchedulerDelegate
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 新增:处理Turbo Mode礼物特效开关变化
|
||||
// 🔧 修改:处理Turbo Mode礼物特效开关变化
|
||||
- (void)handleTurboGiftEffectsChanged:(NSNotification *)notification {
|
||||
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||
self.turboGiftEffectsEnabled = enabled;
|
||||
|
||||
// 如果关闭,清理当前效果
|
||||
if (!enabled) {
|
||||
@@ -4328,10 +4293,9 @@ BannerSchedulerDelegate
|
||||
NSLog(@"🎮 RoomAnimationView 礼物特效状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:处理Turbo Mode全局礼物屏幕开关变化
|
||||
// 🔧 修改:处理Turbo Mode全局礼物屏幕开关变化
|
||||
- (void)handleTurboGlobalGiftScreenChanged:(NSNotification *)notification {
|
||||
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||
self.turboGlobalGiftScreenEnabled = enabled;
|
||||
|
||||
// 如果关闭,清理礼物相关 banner
|
||||
if (!enabled) {
|
||||
@@ -4341,10 +4305,9 @@ BannerSchedulerDelegate
|
||||
NSLog(@"🎮 RoomAnimationView 全局礼物屏幕状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:处理Turbo Mode全局游戏屏幕开关变化
|
||||
// 🔧 修改:处理Turbo Mode全局游戏屏幕开关变化
|
||||
- (void)handleTurboGlobalGameScreenChanged:(NSNotification *)notification {
|
||||
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||
self.turboGlobalGameScreenEnabled = enabled;
|
||||
|
||||
// 如果关闭,清理游戏相关 banner
|
||||
if (!enabled) {
|
||||
@@ -4354,6 +4317,29 @@ BannerSchedulerDelegate
|
||||
NSLog(@"🎮 RoomAnimationView 全局游戏屏幕状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:处理Turbo Mode CP麦位开关变化
|
||||
- (void)handleTurboCpMicChanged:(NSNotification *)notification {
|
||||
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||
|
||||
// CP麦位开关的变化由 MicMidpointRectManager 处理,这里只记录日志
|
||||
NSLog(@"🎮 RoomAnimationView CP麦位开关状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:处理当前房间ID设置通知
|
||||
- (void)handleCurrentRoomIdSet:(NSNotification *)notification {
|
||||
NSString *roomId = notification.userInfo[@"roomId"];
|
||||
|
||||
if (roomId && roomId.length > 0) {
|
||||
self.currentRoomId = roomId;
|
||||
|
||||
// 更新礼物特效开关状态(基于房间信息)
|
||||
[[TurboModeStateManager sharedManager] updateGiftEffectsForRoom:roomId
|
||||
enabled:self.hostDelegate.getRoomInfo.hasAnimationEffect];
|
||||
|
||||
NSLog(@"🎮 RoomAnimationView: 收到房间ID设置通知,房间ID: %@", roomId);
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 新增:检查重要动画状态
|
||||
- (BOOL)hasImportantAnimationPlaying {
|
||||
// 检查 topContainer 中是否有正在播放的重要动画
|
||||
|
@@ -26,6 +26,27 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
// 重置全局 turbo mode
|
||||
- (void)resetTurboMode;
|
||||
|
||||
// 🔧 新增:启动 TurboModeStateManager,在用户登录成功后调用
|
||||
- (void)startupWithCurrentUser:(NSString *)userId;
|
||||
|
||||
// 🔧 新增:更新礼物特效开关状态(通过 RoomInfo.hasAnimationEffect 更新)
|
||||
- (void)updateGiftEffectsForRoom:(NSString *)roomId enabled:(BOOL)enabled;
|
||||
|
||||
// 🔧 新增:获取各开关状态
|
||||
- (BOOL)isGiftEffectsEnabledForRoom:(NSString *)roomId;
|
||||
- (BOOL)isGlobalGiftScreenEnabledForRoom:(NSString *)roomId;
|
||||
- (BOOL)isGlobalGameScreenEnabledForRoom:(NSString *)roomId;
|
||||
- (BOOL)isCpMicEnabledForRoom:(NSString *)roomId;
|
||||
|
||||
// 🔧 新增:设置各开关状态
|
||||
- (void)setGlobalGiftScreenEnabledForRoom:(NSString *)roomId enabled:(BOOL)enabled;
|
||||
- (void)setGlobalGameScreenEnabledForRoom:(NSString *)roomId enabled:(BOOL)enabled;
|
||||
- (void)setCpMicEnabledForRoom:(NSString *)roomId enabled:(BOOL)enabled;
|
||||
|
||||
// 🔧 新增:设置当前房间ID(进房成功后调用)
|
||||
- (void)setCurrentRoomId:(NSString *)roomId;
|
||||
- (NSString *)loadCurrentRoomId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -11,6 +11,9 @@
|
||||
@interface TurboModeStateManager ()
|
||||
|
||||
@property (nonatomic, assign) BOOL globalTurboEnabled; // 全局 turbo 模式
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, NSDictionary *> *roomSwitchStates; // 所有房间的开关状态
|
||||
@property (nonatomic, copy) NSString *currentUserId; // 当前用户ID
|
||||
@property (nonatomic, copy) NSString *currentRoomId;
|
||||
|
||||
@end
|
||||
|
||||
@@ -31,12 +34,153 @@
|
||||
if (self = [super init]) {
|
||||
// 从全局缓存加载
|
||||
self.globalTurboEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"TurboMode_Global"];
|
||||
self.roomSwitchStates = [NSMutableDictionary dictionary];
|
||||
self.currentUserId = nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Public Methods
|
||||
|
||||
// 🔧 新增:启动 TurboModeStateManager,在用户登录成功后调用
|
||||
- (void)startupWithCurrentUser:(NSString *)userId {
|
||||
if (!userId) return;
|
||||
|
||||
self.currentUserId = userId;
|
||||
[self loadAllRoomSwitchStates];
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 已启动,用户ID: %@", userId);
|
||||
}
|
||||
|
||||
// 🔧 新增:加载所有房间的开关状态
|
||||
- (void)loadAllRoomSwitchStates {
|
||||
if (!self.currentUserId) return;
|
||||
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *prefix = [NSString stringWithFormat:@"Turbo_%@_", self.currentUserId];
|
||||
|
||||
// 遍历所有 UserDefaults 中的 key,找到属于当前用户的房间开关状态
|
||||
NSDictionary *allDefaults = [defaults dictionaryRepresentation];
|
||||
for (NSString *key in allDefaults.allKeys) {
|
||||
if ([key hasPrefix:prefix] && [key containsString:@"_Room_"]) {
|
||||
// 提取房间ID
|
||||
NSString *roomId = [self extractRoomIdFromKey:key];
|
||||
if (roomId) {
|
||||
[self loadSwitchStatesForRoom:roomId];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 已加载 %lu 个房间的开关状态", (unsigned long)self.roomSwitchStates.count);
|
||||
}
|
||||
|
||||
// 🔧 新增:更新礼物特效开关状态(通过 RoomInfo.hasAnimationEffect 更新)
|
||||
- (void)updateGiftEffectsForRoom:(NSString *)roomId enabled:(BOOL)enabled {
|
||||
if (!roomId) return;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
NSMutableDictionary *roomStates = [self.roomSwitchStates[roomId] mutableCopy];
|
||||
roomStates[@"giftEffects"] = @(enabled);
|
||||
self.roomSwitchStates[roomId] = roomStates;
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 房间 %@ 礼物特效开关更新为 %@", roomId, enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:获取礼物特效开关状态
|
||||
- (BOOL)isGiftEffectsEnabledForRoom:(NSString *)roomId {
|
||||
if (!roomId) return NO;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
return [self.roomSwitchStates[roomId][@"giftEffects"] boolValue];
|
||||
}
|
||||
|
||||
// 🔧 新增:获取全局礼物屏幕开关状态
|
||||
- (BOOL)isGlobalGiftScreenEnabledForRoom:(NSString *)roomId {
|
||||
if (!roomId) return NO;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
return [self.roomSwitchStates[roomId][@"globalGiftScreen"] boolValue];
|
||||
}
|
||||
|
||||
// 🔧 新增:获取全局游戏屏幕开关状态
|
||||
- (BOOL)isGlobalGameScreenEnabledForRoom:(NSString *)roomId {
|
||||
if (!roomId) return NO;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
return [self.roomSwitchStates[roomId][@"globalGameScreen"] boolValue];
|
||||
}
|
||||
|
||||
// 🔧 新增:获取CP麦位开关状态
|
||||
- (BOOL)isCpMicEnabledForRoom:(NSString *)roomId {
|
||||
if (!roomId) return NO;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
return [self.roomSwitchStates[roomId][@"cpMic"] boolValue];
|
||||
}
|
||||
|
||||
// 🔧 新增:设置全局礼物屏幕开关
|
||||
- (void)setGlobalGiftScreenEnabledForRoom:(NSString *)roomId enabled:(BOOL)enabled {
|
||||
if (!roomId) return;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
NSMutableDictionary *roomStates = [self.roomSwitchStates[roomId] mutableCopy];
|
||||
roomStates[@"globalGiftScreen"] = @(enabled);
|
||||
self.roomSwitchStates[roomId] = roomStates;
|
||||
|
||||
// 持久化到 NSUserDefaults
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// 发送通知
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kTurboGlobalGiftScreenEnabledChanged
|
||||
object:nil
|
||||
userInfo:@{@"on": @(enabled), @"roomId": roomId}];
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 房间 %@ 全局礼物屏幕开关设置为 %@", roomId, enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:设置全局游戏屏幕开关
|
||||
- (void)setGlobalGameScreenEnabledForRoom:(NSString *)roomId enabled:(BOOL)enabled {
|
||||
if (!roomId) return;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
NSMutableDictionary *roomStates = [self.roomSwitchStates[roomId] mutableCopy];
|
||||
roomStates[@"globalGameScreen"] = @(enabled);
|
||||
self.roomSwitchStates[roomId] = roomStates;
|
||||
|
||||
// 持久化到 NSUserDefaults
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// 发送通知
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kTurboGlobalGameScreenEnabledChanged
|
||||
object:nil
|
||||
userInfo:@{@"on": @(enabled), @"roomId": roomId}];
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 房间 %@ 全局游戏屏幕开关设置为 %@", roomId, enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
// 🔧 新增:设置CP麦位开关
|
||||
- (void)setCpMicEnabledForRoom:(NSString *)roomId enabled:(BOOL)enabled {
|
||||
if (!roomId) return;
|
||||
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
NSMutableDictionary *roomStates = [self.roomSwitchStates[roomId] mutableCopy];
|
||||
roomStates[@"cpMic"] = @(enabled);
|
||||
self.roomSwitchStates[roomId] = roomStates;
|
||||
|
||||
// 持久化到 NSUserDefaults
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:kTurboCpMicEnabledKey(roomId)];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// 发送通知
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kTurboCpMicEnabledChanged
|
||||
object:nil
|
||||
userInfo:@{@"on": @(enabled), @"roomId": roomId}];
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 房间 %@ CP麦位开关设置为 %@", roomId, enabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
- (void)setTurboModeEnabled:(BOOL)enabled {
|
||||
self.globalTurboEnabled = enabled;
|
||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"TurboMode_Global"];
|
||||
@@ -76,11 +220,12 @@
|
||||
BOOL turboModeEnabled = [self isTurboModeEnabled];
|
||||
|
||||
if (turboModeEnabled) {
|
||||
// turbo mode = YES,3个开关全部关闭
|
||||
// turbo mode = YES,4个开关全部关闭
|
||||
return @{
|
||||
@"giftEffects": @(NO),
|
||||
@"globalGiftScreen": @(NO),
|
||||
@"globalGameScreen": @(NO)
|
||||
@"globalGameScreen": @(NO),
|
||||
@"cpMic": @(NO)
|
||||
};
|
||||
} else {
|
||||
// turbo mode = NO,返回当前缓存的状态
|
||||
@@ -89,18 +234,21 @@
|
||||
// 礼物特效:按需求不持久化,这里默认开启(面板或 RoomAnimationView 会基于 roomInfo 决定)
|
||||
BOOL giftEffects = YES;
|
||||
|
||||
// 全局礼物屏幕:从缓存读取
|
||||
// 🔧 修复:使用与 RoomAnimationView 和 XPEffectPanelViewController 一致的逻辑
|
||||
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||
BOOL globalGiftScreen = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : YES;
|
||||
BOOL globalGiftScreen = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : NO;
|
||||
|
||||
// 全局游戏屏幕:从缓存读取
|
||||
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||
BOOL globalGameScreen = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : YES;
|
||||
BOOL globalGameScreen = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : NO;
|
||||
|
||||
id cpMicObj = [defaults objectForKey:kTurboCpMicEnabledKey(roomId)];
|
||||
BOOL cpMic = (cpMicObj != nil) ? [defaults boolForKey:kTurboCpMicEnabledKey(roomId)] : NO;
|
||||
|
||||
return @{
|
||||
@"giftEffects": @(giftEffects),
|
||||
@"globalGiftScreen": @(globalGiftScreen),
|
||||
@"globalGameScreen": @(globalGameScreen)
|
||||
@"globalGameScreen": @(globalGameScreen),
|
||||
@"cpMic": @(cpMic)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -180,4 +328,87 @@
|
||||
// 不再按房间加载,已改为全局
|
||||
}
|
||||
|
||||
// 🔧 新增:从 key 中提取房间ID
|
||||
- (NSString *)extractRoomIdFromKey:(NSString *)key {
|
||||
// key 格式: Turbo_UserId_Room_RoomId_GlobalGiftScreen
|
||||
NSArray *components = [key componentsSeparatedByString:@"_"];
|
||||
if (components.count >= 4) {
|
||||
// 找到 "Room" 的位置
|
||||
NSInteger roomIndex = -1;
|
||||
for (NSInteger i = 0; i < components.count; i++) {
|
||||
if ([components[i] isEqualToString:@"Room"]) {
|
||||
roomIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (roomIndex != -1 && roomIndex + 1 < components.count) {
|
||||
return components[roomIndex + 1];
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
// 🔧 新增:确保房间开关状态存在
|
||||
- (void)ensureRoomSwitchStatesExist:(NSString *)roomId {
|
||||
if (!roomId) return;
|
||||
|
||||
if (!self.roomSwitchStates[roomId]) {
|
||||
[self loadSwitchStatesForRoom:roomId];
|
||||
}
|
||||
}
|
||||
|
||||
// 🔧 新增:加载指定房间的开关状态
|
||||
- (void)loadSwitchStatesForRoom:(NSString *)roomId {
|
||||
if (!roomId) return;
|
||||
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
// 礼物特效:从房间信息获取,这里先设为默认值
|
||||
BOOL giftEffects = YES;
|
||||
|
||||
// 其他三个开关:从 NSUserDefaults 读取
|
||||
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||
BOOL globalGiftScreen = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : NO;
|
||||
|
||||
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||
BOOL globalGameScreen = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : NO;
|
||||
|
||||
id cpMicObj = [defaults objectForKey:kTurboCpMicEnabledKey(roomId)];
|
||||
BOOL cpMic = (cpMicObj != nil) ? [defaults boolForKey:kTurboCpMicEnabledKey(roomId)] : NO;
|
||||
|
||||
self.roomSwitchStates[roomId] = @{
|
||||
@"giftEffects": @(giftEffects),
|
||||
@"globalGiftScreen": @(globalGiftScreen),
|
||||
@"globalGameScreen": @(globalGameScreen),
|
||||
@"cpMic": @(cpMic)
|
||||
};
|
||||
}
|
||||
|
||||
#pragma mark - 当前房间ID管理
|
||||
|
||||
// 🔧 新增:设置当前房间ID(进房成功后调用)
|
||||
- (void)setCurrentRoomId:(NSString *)roomId {
|
||||
if (!roomId) return;
|
||||
if ([roomId isEqualToString:_currentRoomId]) {
|
||||
return;
|
||||
}
|
||||
|
||||
_currentRoomId = roomId;
|
||||
|
||||
// 确保当前房间的开关状态存在
|
||||
[self ensureRoomSwitchStatesExist:roomId];
|
||||
|
||||
// 发送通知,告知其他组件房间ID已设置
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kTurboCurrentRoomIdSet
|
||||
object:nil
|
||||
userInfo:@{@"roomId": roomId}];
|
||||
|
||||
NSLog(@"🎮 TurboModeStateManager: 设置当前房间ID: %@", roomId);
|
||||
}
|
||||
|
||||
// 🔧 新增:获取当前房间ID
|
||||
- (NSString *)loadCurrentRoomId {
|
||||
return self.currentRoomId;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -16,15 +16,13 @@
|
||||
@property (nonatomic, strong) UIButton *dismissButton;
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
|
||||
// 三个开关
|
||||
// 四个开关
|
||||
@property (nonatomic, strong) UISwitch *giftEffectsSwitch; // 礼物特效开关
|
||||
@property (nonatomic, strong) UISwitch *globalGiftScreenSwitch; // 全局礼物屏幕开关
|
||||
@property (nonatomic, strong) UISwitch *globalGameScreenSwitch; // 全局游戏屏幕开关
|
||||
@property (nonatomic, strong) UISwitch *cpMicSwitch; // CP麦位开关
|
||||
|
||||
// 开关状态
|
||||
@property (nonatomic, assign) BOOL giftEffectsEnabled; // 礼物特效开关状态(临时)
|
||||
@property (nonatomic, assign) BOOL globalGiftScreenEnabled; // 全局礼物屏幕开关状态(持久化)
|
||||
@property (nonatomic, assign) BOOL globalGameScreenEnabled; // 全局游戏屏幕开关状态(持久化)
|
||||
// 🔧 移除:本地开关状态,改为使用 TurboModeStateManager
|
||||
|
||||
// 房间信息
|
||||
@property (nonatomic, strong) NSString *roomId; // 当前房间 ID
|
||||
@@ -59,7 +57,7 @@
|
||||
// 设置约束 - 使用 Masonry
|
||||
[self.bottomAreaBackground mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.bottom.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(300);
|
||||
make.height.mas_equalTo(370); // 增加高度以容纳第四个开关
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -111,6 +109,11 @@
|
||||
[self setupSwitchItem:YMLocalizedString(@"20.20.62_text_12") // Global game screen
|
||||
switch:self.globalGameScreenSwitch
|
||||
atIndex:2];
|
||||
|
||||
// CP麦位开关(持久化)
|
||||
[self setupSwitchItem:YMLocalizedString(@"20.20.62_text_21") // CP mic
|
||||
switch:self.cpMicSwitch
|
||||
atIndex:3];
|
||||
}
|
||||
|
||||
- (void)setupSwitchItem:(NSString *)title
|
||||
@@ -161,6 +164,8 @@
|
||||
self.globalGiftScreenSwitch = switchViewControl;
|
||||
} else if (index == 2) {
|
||||
self.globalGameScreenSwitch = switchViewControl;
|
||||
} else if (index == 3) {
|
||||
self.cpMicSwitch = switchViewControl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,40 +173,30 @@
|
||||
NSString *roomId = @(self.roomInfo.roomId).stringValue;
|
||||
self.roomId = roomId;
|
||||
|
||||
// 检查 turbo mode 状态(全局)
|
||||
BOOL turboModeEnabled = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 获取开关状态
|
||||
TurboModeStateManager *manager = [TurboModeStateManager sharedManager];
|
||||
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
// 更新礼物特效开关状态(基于房间信息)
|
||||
[manager updateGiftEffectsForRoom:roomId enabled:self.roomInfo.hasAnimationEffect];
|
||||
|
||||
if (turboModeEnabled) {
|
||||
// turbo mode = YES,3个开关全部关闭
|
||||
self.giftEffectsEnabled = NO;
|
||||
self.globalGiftScreenEnabled = NO;
|
||||
self.globalGameScreenEnabled = NO;
|
||||
// 保持所有开关可点击,不设置 enabled = NO
|
||||
NSLog(@"🎮 Turbo Mode 已开启,所有开关显示关闭状态但可点击");
|
||||
} else {
|
||||
// turbo mode = NO,正常读取开关状态
|
||||
// 礼物特效:直接使用房间默认状态,不需要检查持久化
|
||||
self.giftEffectsEnabled = self.roomInfo.hasAnimationEffect;
|
||||
|
||||
// 其他两个开关:从房间特定的 NSUserDefaults 读取(区分未设置与显式 NO)
|
||||
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||
self.globalGiftScreenEnabled = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : YES; // 默认开启
|
||||
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||
self.globalGameScreenEnabled = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : YES; // 默认开启
|
||||
}
|
||||
// 获取各开关状态
|
||||
BOOL giftEffectsEnabled = [manager isGiftEffectsEnabledForRoom:roomId];
|
||||
BOOL globalGiftScreenEnabled = [manager isGlobalGiftScreenEnabledForRoom:roomId];
|
||||
BOOL globalGameScreenEnabled = [manager isGlobalGameScreenEnabledForRoom:roomId];
|
||||
BOOL cpMicEnabled = [manager isCpMicEnabledForRoom:roomId];
|
||||
|
||||
// 设置开关初始状态
|
||||
self.giftEffectsSwitch.on = self.giftEffectsEnabled;
|
||||
self.globalGiftScreenSwitch.on = self.globalGiftScreenEnabled;
|
||||
self.globalGameScreenSwitch.on = self.globalGameScreenEnabled;
|
||||
self.giftEffectsSwitch.on = giftEffectsEnabled;
|
||||
self.globalGiftScreenSwitch.on = globalGiftScreenEnabled;
|
||||
self.globalGameScreenSwitch.on = globalGameScreenEnabled;
|
||||
self.cpMicSwitch.on = cpMicEnabled;
|
||||
|
||||
NSLog(@"🎮 Turbo Mode开关初始化完成 - 房间ID: %@, 礼物特效: %@, 全局礼物屏幕: %@, 全局游戏屏幕: %@",
|
||||
NSLog(@"🎮 Turbo Mode开关初始化完成 - 房间ID: %@, 礼物特效: %@, 全局礼物屏幕: %@, 全局游戏屏幕: %@, CP麦位: %@",
|
||||
roomId,
|
||||
self.giftEffectsEnabled ? @"开启" : @"关闭",
|
||||
self.globalGiftScreenEnabled ? @"开启" : @"关闭",
|
||||
self.globalGameScreenEnabled ? @"开启" : @"关闭");
|
||||
giftEffectsEnabled ? @"开启" : @"关闭",
|
||||
globalGiftScreenEnabled ? @"开启" : @"关闭",
|
||||
globalGameScreenEnabled ? @"开启" : @"关闭",
|
||||
cpMicEnabled ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
- (void)switchValueChanged:(UISwitch *)sender {
|
||||
@@ -214,52 +209,47 @@
|
||||
// turbo mode 开启时,用户点击开启开关,自动关闭 turbo mode
|
||||
[[TurboModeStateManager sharedManager] setTurboModeEnabled:NO];
|
||||
|
||||
// 更新本地状态为开启
|
||||
if (sender.tag == 0) { // 礼物特效开关
|
||||
self.giftEffectsEnabled = YES;
|
||||
} else if (sender.tag == 1) { // 全局礼物屏幕
|
||||
self.globalGiftScreenEnabled = YES;
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 更新开关状态
|
||||
TurboModeStateManager *manager = [TurboModeStateManager sharedManager];
|
||||
if (sender.tag == 1) { // 全局礼物屏幕
|
||||
[manager setGlobalGiftScreenEnabledForRoom:self.roomId enabled:YES];
|
||||
} else if (sender.tag == 2) { // 全局游戏屏幕
|
||||
self.globalGameScreenEnabled = YES;
|
||||
[manager setGlobalGameScreenEnabledForRoom:self.roomId enabled:YES];
|
||||
} else if (sender.tag == 3) { // CP麦位开关
|
||||
[manager setCpMicEnabledForRoom:self.roomId enabled:YES];
|
||||
}
|
||||
|
||||
// 发送通知,让 RoomAnimationView 更新状态
|
||||
[self sendSwitchStateChangeNotification:sender.tag enabled:YES];
|
||||
|
||||
NSLog(@"🎮 Turbo Mode 已自动关闭,开关 %ld 已开启", (long)sender.tag);
|
||||
return;
|
||||
}
|
||||
|
||||
// 正常处理开关状态变化
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 处理开关状态变化
|
||||
TurboModeStateManager *manager = [TurboModeStateManager sharedManager];
|
||||
|
||||
if (sender.tag == 0) { // 礼物特效开关
|
||||
// 临时更改房间状态,不影响 roomInfo.hasAnimationEffect
|
||||
self.giftEffectsEnabled = isOn;
|
||||
// 发送通知,让 RoomAnimationView 临时应用
|
||||
[self sendTurboGiftEffectsNotification:isOn];
|
||||
// 礼物特效开关不持久化,只更新临时状态
|
||||
[manager updateGiftEffectsForRoom:self.roomId enabled:isOn];
|
||||
|
||||
} else if (sender.tag == 1) { // 全局礼物屏幕
|
||||
self.globalGiftScreenEnabled = isOn;
|
||||
// 按房间 ID 持久化
|
||||
[[NSUserDefaults standardUserDefaults]
|
||||
setBool:isOn forKey:kTurboGlobalGiftScreenEnabledKey(self.roomId)];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
[self sendTurboGlobalGiftScreenNotification:isOn];
|
||||
[manager setGlobalGiftScreenEnabledForRoom:self.roomId enabled:isOn];
|
||||
|
||||
// 🔧 新增:显示 toast 提示
|
||||
NSString *toastMessage = isOn ? YMLocalizedString(@"20.20.62_text_17") : YMLocalizedString(@"20.20.62_text_18");
|
||||
[self showToastWithMessage:toastMessage];
|
||||
|
||||
} else if (sender.tag == 2) { // 全局游戏屏幕
|
||||
self.globalGameScreenEnabled = isOn;
|
||||
// 按房间 ID 持久化
|
||||
[[NSUserDefaults standardUserDefaults]
|
||||
setBool:isOn forKey:kTurboGlobalGameScreenEnabledKey(self.roomId)];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
[self sendTurboGlobalGameScreenNotification:isOn];
|
||||
[manager setGlobalGameScreenEnabledForRoom:self.roomId enabled:isOn];
|
||||
|
||||
// 🔧 新增:显示 toast 提示
|
||||
NSString *toastMessage = isOn ? YMLocalizedString(@"20.20.62_text_19") : YMLocalizedString(@"20.20.62_text_20");
|
||||
[self showToastWithMessage:toastMessage];
|
||||
|
||||
} else if (sender.tag == 3) { // CP麦位开关
|
||||
[manager setCpMicEnabledForRoom:self.roomId enabled:isOn];
|
||||
|
||||
// 🔧 新增:显示 toast 提示
|
||||
NSString *toastMessage = isOn ? YMLocalizedString(@"20.20.62_text_22") : YMLocalizedString(@"20.20.62_text_23");
|
||||
[self showToastWithMessage:toastMessage];
|
||||
}
|
||||
|
||||
// 通知父控制器更新 Turbo_Mode 按钮状态
|
||||
@@ -268,27 +258,14 @@
|
||||
NSLog(@"🎮 Turbo Mode开关变化 - 索引: %ld, 状态: %@", (long)sender.tag, isOn ? @"开启" : @"关闭");
|
||||
}
|
||||
|
||||
- (void)sendSwitchStateChangeNotification:(NSInteger)switchTag enabled:(BOOL)enabled {
|
||||
// 根据开关类型发送对应的通知
|
||||
switch (switchTag) {
|
||||
case 0: // 礼物特效开关
|
||||
[self sendTurboGiftEffectsNotification:enabled];
|
||||
break;
|
||||
case 1: // 全局礼物屏幕开关
|
||||
[self sendTurboGlobalGiftScreenNotification:enabled];
|
||||
break;
|
||||
case 2: // 全局游戏屏幕开关
|
||||
[self sendTurboGlobalGameScreenNotification:enabled];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)notifyParentUpdateTurboModeButton {
|
||||
BOOL allSwitchesOn = self.giftEffectsEnabled &&
|
||||
self.globalGiftScreenEnabled &&
|
||||
self.globalGameScreenEnabled;
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 获取开关状态
|
||||
TurboModeStateManager *manager = [TurboModeStateManager sharedManager];
|
||||
BOOL allSwitchesOn = [manager isGiftEffectsEnabledForRoom:self.roomId] &&
|
||||
[manager isGlobalGiftScreenEnabledForRoom:self.roomId] &&
|
||||
[manager isGlobalGameScreenEnabledForRoom:self.roomId] &&
|
||||
[manager isCpMicEnabledForRoom:self.roomId];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:kTurboModeButtonStateChanged
|
||||
@@ -297,27 +274,7 @@
|
||||
}
|
||||
|
||||
#pragma mark - Notification Methods
|
||||
|
||||
- (void)sendTurboGiftEffectsNotification:(BOOL)enabled {
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:kTurboGiftEffectsEnabledChanged
|
||||
object:nil
|
||||
userInfo:@{@"on": @(enabled)}];
|
||||
}
|
||||
|
||||
- (void)sendTurboGlobalGiftScreenNotification:(BOOL)enabled {
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:kTurboGlobalGiftScreenEnabledChanged
|
||||
object:nil
|
||||
userInfo:@{@"on": @(enabled)}];
|
||||
}
|
||||
|
||||
- (void)sendTurboGlobalGameScreenNotification:(BOOL)enabled {
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:kTurboGlobalGameScreenEnabledChanged
|
||||
object:nil
|
||||
userInfo:@{@"on": @(enabled)}];
|
||||
}
|
||||
// 🔧 移除:通知发送方法,由 TurboModeStateManager 统一处理
|
||||
|
||||
- (void)setupTapGesture {
|
||||
// 创建点击手势识别器,点击空白区域时关闭 VC
|
||||
|
@@ -18,6 +18,8 @@
|
||||
#import "RtcManager.h"
|
||||
///Model
|
||||
#import "XPRoomMoreItemModel.h"
|
||||
///Manager
|
||||
#import "TurboModeStateManager.h"
|
||||
#import "RoomInfoModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
#import "GuildSuperAdminInfoModel.h"
|
||||
@@ -159,14 +161,19 @@ extern NSString *const kTurboModeButtonStateChanged;
|
||||
- (void)updateTurboModeButtonStateOnRoomEnter {
|
||||
NSString *roomId = @(self.roomInfo.roomId).stringValue;
|
||||
|
||||
// 读取三个开关状态
|
||||
BOOL giftEffectsEnabled = self.roomInfo.hasAnimationEffect;
|
||||
BOOL globalGiftScreenEnabled = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] ?: YES;
|
||||
BOOL globalGameScreenEnabled = [[NSUserDefaults standardUserDefaults]
|
||||
boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] ?: YES;
|
||||
// 🔧 修改:直接使用 TurboModeStateManager 获取开关状态
|
||||
TurboModeStateManager *manager = [TurboModeStateManager sharedManager];
|
||||
|
||||
BOOL allOn = giftEffectsEnabled && globalGiftScreenEnabled && globalGameScreenEnabled;
|
||||
// 更新礼物特效开关状态(基于房间信息)
|
||||
[manager updateGiftEffectsForRoom:roomId enabled:self.roomInfo.hasAnimationEffect];
|
||||
|
||||
// 获取各开关状态
|
||||
BOOL giftEffectsEnabled = [manager isGiftEffectsEnabledForRoom:roomId];
|
||||
BOOL globalGiftScreenEnabled = [manager isGlobalGiftScreenEnabledForRoom:roomId];
|
||||
BOOL globalGameScreenEnabled = [manager isGlobalGameScreenEnabledForRoom:roomId];
|
||||
BOOL cpMicEnabled = [manager isCpMicEnabledForRoom:roomId];
|
||||
|
||||
BOOL allOn = giftEffectsEnabled && globalGiftScreenEnabled && globalGameScreenEnabled && cpMicEnabled;
|
||||
[self updateTurboModeButtonState:allOn];
|
||||
}
|
||||
|
||||
|
@@ -31,6 +31,13 @@ NSString *kTurboGlobalGiftScreenEnabledKey(NSString *roomId);
|
||||
*/
|
||||
NSString *kTurboGlobalGameScreenEnabledKey(NSString *roomId);
|
||||
|
||||
/**
|
||||
* 生成CP麦位开关的缓存 Key
|
||||
* @param roomId 房间 ID
|
||||
* @return 格式化的缓存 Key
|
||||
*/
|
||||
NSString *kTurboCpMicEnabledKey(NSString *roomId);
|
||||
|
||||
// MARK: - 通知名称常量
|
||||
/**
|
||||
* 礼物特效开关状态改变通知
|
||||
@@ -47,6 +54,16 @@ extern NSString *const kTurboGlobalGiftScreenEnabledChanged;
|
||||
*/
|
||||
extern NSString *const kTurboGlobalGameScreenEnabledChanged;
|
||||
|
||||
/**
|
||||
* CP麦位开关状态改变通知
|
||||
*/
|
||||
extern NSString *const kTurboCpMicEnabledChanged;
|
||||
|
||||
/**
|
||||
* 当前房间ID设置通知
|
||||
*/
|
||||
extern NSString *const kTurboCurrentRoomIdSet;
|
||||
|
||||
/**
|
||||
* Turbo Mode 按钮状态改变通知
|
||||
*/
|
||||
|
@@ -20,8 +20,14 @@ NSString *kTurboGlobalGameScreenEnabledKey(NSString *roomId) {
|
||||
return [NSString stringWithFormat:@"TurboGlobalGameScreen_%@", roomId];
|
||||
}
|
||||
|
||||
NSString *kTurboCpMicEnabledKey(NSString *roomId) {
|
||||
return [NSString stringWithFormat:@"TurboCpMic_%@", roomId];
|
||||
}
|
||||
|
||||
// MARK: - 通知名称常量定义
|
||||
NSString *const kTurboGiftEffectsEnabledChanged = @"kTurboGiftEffectsEnabledChanged";
|
||||
NSString *const kTurboGlobalGiftScreenEnabledChanged = @"kTurboGlobalGiftScreenEnabledChanged";
|
||||
NSString *const kTurboGlobalGameScreenEnabledChanged = @"kTurboGlobalGameScreenEnabledChanged";
|
||||
NSString *const kTurboCpMicEnabledChanged = @"kTurboCpMicEnabledChanged";
|
||||
NSString *const kTurboCurrentRoomIdSet = @"kTurboCurrentRoomIdSet";
|
||||
NSString *const kTurboModeButtonStateChanged = @"kTurboModeButtonStateChanged";
|
||||
|
@@ -28,6 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, strong, readonly) NSArray *cachedCpList;
|
||||
/// 缓存:麦位position -> uid(无用户为-1)
|
||||
@property (nonatomic, strong, readonly) NSDictionary<NSNumber *, NSNumber *> *micPositionToUid;
|
||||
/// CP麦位开关状态
|
||||
@property (nonatomic, assign) BOOL cpMicEnabled;
|
||||
|
||||
/// 初始化方法
|
||||
- (instancetype)initWithContainerView:(UIView *)containerView;
|
||||
|
@@ -10,6 +10,8 @@
|
||||
#import <SVGA.h>
|
||||
#import "StageView.h"
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "XPTurboModeConstants.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class SVGAImageView;
|
||||
@class SVGAParser;
|
||||
@@ -35,6 +37,10 @@
|
||||
_svgaParser = [[SVGAParser alloc] init];
|
||||
_micPositionToUidInternal = [NSMutableDictionary dictionary];
|
||||
_midpointRectInfo = [NSMutableDictionary dictionary];
|
||||
_cpMicEnabled = YES; // 默认开启
|
||||
|
||||
// 设置通知监听
|
||||
[self setupNotifications];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -71,8 +77,8 @@
|
||||
[self.containerView addSubview:rectView];
|
||||
[self.midpointRects addObject:rectView];
|
||||
|
||||
// 如果需要自动播放SVGA动画
|
||||
if (autoPlaySVGA) {
|
||||
// 如果需要自动播放SVGA动画且CP麦位开关开启
|
||||
if (autoPlaySVGA && self.cpMicEnabled) {
|
||||
[self playSVGAAnimationAtFrame:frame];
|
||||
}
|
||||
|
||||
@@ -101,14 +107,16 @@
|
||||
if (leftUid <= 0 && rightUid <= 0) {
|
||||
return;
|
||||
}
|
||||
// 遍历匹配并播放对应等级的SVGA
|
||||
for (MicCpInfoModel *obj in cpList) {
|
||||
BOOL match = (obj.uid == leftUid && obj.loverUid == rightUid) || (obj.uid == rightUid && obj.loverUid == leftUid);
|
||||
if (match) {
|
||||
NSInteger safeLevel = MAX(1, MIN(5, obj.cpLevel+1));
|
||||
NSString *svgaName = [NSString stringWithFormat:@"mic_cp_lv%ld", (long)safeLevel];
|
||||
[self playSVGAAnimationAtFrame:frame withNamed:svgaName];
|
||||
break;
|
||||
// 遍历匹配并播放对应等级的SVGA(仅在CP麦位开关开启时)
|
||||
if (self.cpMicEnabled) {
|
||||
for (MicCpInfoModel *obj in cpList) {
|
||||
BOOL match = (obj.uid == leftUid && obj.loverUid == rightUid) || (obj.uid == rightUid && obj.loverUid == leftUid);
|
||||
if (match) {
|
||||
NSInteger safeLevel = MAX(1, MIN(5, obj.cpLevel+1));
|
||||
NSString *svgaName = [NSString stringWithFormat:@"mic_cp_lv%ld", (long)safeLevel];
|
||||
[self playSVGAAnimationAtFrame:frame withNamed:svgaName];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,7 +384,30 @@
|
||||
|
||||
#pragma mark - Dealloc
|
||||
|
||||
- (void)setupNotifications {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleCpMicSwitchChanged:)
|
||||
name:kTurboCpMicEnabledChanged
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)handleCpMicSwitchChanged:(NSNotification *)notification {
|
||||
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||
self.cpMicEnabled = enabled;
|
||||
|
||||
if (!enabled) {
|
||||
// 开关关闭时,停止所有SVGA动画
|
||||
[self stopAllSVGAAnimations];
|
||||
NSLog(@"🔧 CP麦位开关已关闭,停止所有SVGA动画");
|
||||
} else {
|
||||
// 开关开启时,重新绘制所有CP关系
|
||||
NSLog(@"🔧 CP麦位开关已开启,重新绘制CP关系");
|
||||
// 这里可以触发重新绘制逻辑,具体实现取决于调用方
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[self removeAllMidpointRects];
|
||||
}
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#import "RtcManager.h"
|
||||
#import "XPRoomMiniManager.h"
|
||||
#import "TTPopup.h"
|
||||
#import "TurboModeStateManager.h"
|
||||
#import "Api+ArrangeMic.h"
|
||||
#import "Api+Room.h"
|
||||
#import "DESEncrypt.h"
|
||||
@@ -1075,6 +1076,9 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
// 🔧 新增:stage view类型变化时调用CP相关API
|
||||
NSMutableDictionary<NSString *,MicroQueueModel *> *currentQueue = [self.stageView getMicroQueue];
|
||||
[self callMicCpListByUidListOnMicChangeWithQueue:currentQueue];
|
||||
|
||||
// 🔧 新增:检查19 mic房间中央位置(position 6)用户资格
|
||||
[self checkCentralPositionUserQualification:currentQueue];
|
||||
|
||||
[self addExitGameButton];
|
||||
|
||||
@@ -1197,7 +1201,11 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
return;
|
||||
}
|
||||
_roomInfo = roomInfo;
|
||||
[[LuckyPackageLogicManager sharedInstance] setRoomUid:@(roomInfo.uid).stringValue];
|
||||
|
||||
NSString *roomId = @(self.roomInfo.roomId).stringValue;
|
||||
NSLog(@"🎮 设置房间ID: %@", roomId);
|
||||
[[TurboModeStateManager sharedManager] setCurrentRoomId:roomId];
|
||||
[[LuckyPackageLogicManager sharedInstance] setRoomUid:roomId];
|
||||
[[RoomResourceManager sharedManager] updateCurrentSkinID:roomInfo.usedMicSkinId
|
||||
effectID:roomInfo.usedMicEffectId];
|
||||
|
||||
@@ -1739,7 +1747,7 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
|
||||
[self.stageView onRoomEntered];
|
||||
[self.functionView onRoomEntered];
|
||||
|
||||
|
||||
// 🔧 新增:初始化当前用户的麦位状态
|
||||
[self initializeCurrentUserMicStatus];
|
||||
|
||||
@@ -4303,4 +4311,63 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
/// 检查19 mic房间中央位置(position 6)用户资格
|
||||
- (void)checkCentralPositionUserQualification:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
// 只检查19 mic房间
|
||||
if (self.roomInfo.type != RoomType_19Mic) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSLog(@"🔧 检查19 mic房间中央位置用户资格");
|
||||
|
||||
// 查找中央位置(position 6)的用户
|
||||
MicroQueueModel *centralMicModel = nil;
|
||||
for (NSString *positionKey in queue.allKeys) {
|
||||
MicroQueueModel *micModel = queue[positionKey];
|
||||
if (micModel.microState.position == 6) {
|
||||
centralMicModel = micModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果中央位置有用户,检查其资格
|
||||
if (centralMicModel && centralMicModel.userInfo) {
|
||||
NSString *userId = [NSString stringWithFormat:@"%ld", (long)centralMicModel.userInfo.uid];
|
||||
NSLog(@"🔧 中央位置用户:%@,检查资格", userId);
|
||||
|
||||
// 调用Boss位置资格检查API
|
||||
[Api requestBossMicUp:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
NSLog(@"✅ 中央位置用户资格检查通过:%@", userId);
|
||||
} else {
|
||||
NSLog(@"❌ 中央位置用户资格检查失败:%@,错误:%@", userId, msg);
|
||||
// 不满足条件的用户需要下mic
|
||||
[self forceDownMicForUser:userId atPosition:6];
|
||||
}
|
||||
} roomUid:@(self.roomInfo.uid).stringValue uid:userId];
|
||||
} else {
|
||||
NSLog(@"🔧 中央位置无用户,无需检查");
|
||||
}
|
||||
}
|
||||
|
||||
/// 强制用户下mic
|
||||
- (void)forceDownMicForUser:(NSString *)userId atPosition:(NSInteger)position {
|
||||
NSLog(@"🔧 强制用户下mic:%@,位置:%ld", userId, (long)position);
|
||||
|
||||
// 使用 NIM 的 API 强制下mic
|
||||
NIMChatroomQueueRemoveRequest *request = [[NIMChatroomQueueRemoveRequest alloc] init];
|
||||
request.key = [NSString stringWithFormat:@"%ld", (long)position];
|
||||
request.roomId = @(self.roomInfo.uid).stringValue;
|
||||
|
||||
[[NIMSDK sharedSDK].chatroomManager removeChatroomQueueObject:request completion:^(NSError * _Nullable error, NSDictionary<NSString *,NSString *> * _Nullable element) {
|
||||
if (error) {
|
||||
NSLog(@"❌ 强制下mic失败:%@,错误:%@", userId, error.localizedDescription);
|
||||
[XNDJTDDLoadingTool showErrorWithMessage:@"强制下mic失败"];
|
||||
} else {
|
||||
NSLog(@"✅ 强制下mic成功:%@", userId);
|
||||
[XNDJTDDLoadingTool showSuccessWithMessage:@"中央位置需要满足贡献值要求,已自动下mic"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -4251,3 +4251,6 @@ ineHeadView12" = "الحمل";
|
||||
"20.20.62_text_18" = "لقد عطّلتَ تأثير شاشة هدية غروبال العائمة. لم تعد شاشة هدية غروبال العائمة ظاهرة في هذه الغرفة. انقر لتفعيلها مجددًا.";
|
||||
"20.20.62_text_19" = "لقد فعّلتَ تأثير شاشة لعبة غروبال العائمة.";
|
||||
"20.20.62_text_20" = "لقد عطّلتَ تأثير شاشة لعبة غروبال العائمة. لم تعد شاشة لعبة غروبال العائمة ظاهرة في هذه الغرفة. انقر لتفعيلها مجددًا.";
|
||||
"20.20.62_text_21" = "ميكروفون CP";
|
||||
"20.20.62_text_22" = "لقد فعّلتَ تأثيرات ميكروفون CP.";
|
||||
"20.20.62_text_23" = "لقد عطّلتَ تأثيرات ميكروفون CP. لم تعد رسوميات ميكروفون CP ظاهرة في هذه الغرفة. انقر لتفعيلها مجددًا.";
|
||||
|
@@ -4030,6 +4030,9 @@
|
||||
"20.20.62_text_11" = "Global gift screen";
|
||||
"20.20.62_text_12" = "Global game screen";
|
||||
"20.20.62_text_13" = "Turbo mode";
|
||||
"20.20.62_text_21" = "CP mic";
|
||||
"20.20.62_text_22" = "You have enabled CP mic effects.";
|
||||
"20.20.62_text_23" = "You have disabled CP mic effects. CP mic animations are no longer visible in this room. Tap to re-enable.";
|
||||
"20.20.62_text_14" = "我的特效";
|
||||
"20.20.62_text_15.1" = "Enabling Turbo mode can make the app run smoother.\nTurbo mode: Turns off room gift animations, in-room broadcasts, CP displays, and other animated effects.";
|
||||
"20.20.62_text_15.2" = "To make the app run smoother, it has automatically switched to Turbo mode for you (Turbo mode: Automatically turns off gift animations, headwear effects, and merges gift messages in the public chat). You can turn off this mode in the room settings.";
|
||||
|
@@ -3832,3 +3832,6 @@
|
||||
"20.20.62_text_18" = "Küresel hediye yüzen ekran efektini devre dışı bıraktınız. Küresel hediye yüzen ekran artık bu odada görünmüyor. Tekrar etkinleştirmek için tıklayın.";
|
||||
"20.20.62_text_19" = "Küresel oyun yüzen ekran efektini etkinleştirdiniz.";
|
||||
"20.20.62_text_20" = "Küresel oyun yüzen ekran efektini devre dışı bıraktınız. Küresel oyun yüzen ekran artık bu odada görünmüyor. Tekrar etkinleştirmek için tıklayın.";
|
||||
"20.20.62_text_21" = "CP mikrofon";
|
||||
"20.20.62_text_22" = "CP mikrofon efektlerini etkinleştirdiniz.";
|
||||
"20.20.62_text_23" = "CP mikrofon efektlerini devre dışı bıraktınız. CP mikrofon animasyonları artık bu odada görünmüyor. Tekrar etkinleştirmek için tıklayın.";
|
||||
|
@@ -3702,3 +3702,6 @@
|
||||
"20.20.62_text_18" = "你已经关闭全服礼物飘屏特效。本房间内无法看到全服礼物飘屏,点击即可重新开启。";
|
||||
"20.20.62_text_19" = "你已经开启全服游戏飘屏特效。";
|
||||
"20.20.62_text_20" = "你已经关闭全服游戏飘屏特效。本房间内无法看到全服游戏飘屏,点击即可重新开启。";
|
||||
"20.20.62_text_21" = "CP麦位";
|
||||
"20.20.62_text_22" = "你已经开启CP麦位特效。";
|
||||
"20.20.62_text_23" = "你已经关闭CP麦位特效。本房间内无法看到CP麦位动画,点击即可重新开启。";
|
||||
|