移除与心愿礼物相关的代码和引用,简化房间功能模块,更新房间更多菜单的 Action 类以集成 PK 相关功能,提升代码可维护性和扩展性。

This commit is contained in:
edwinQQQ
2025-09-01 16:55:13 +08:00
parent 860304ea15
commit c41df5caa0
13 changed files with 504 additions and 228 deletions

View File

@@ -161,10 +161,6 @@ typedef NS_ENUM(NSInteger, RoomDatingStateChangeType) {
@property (nonatomic, assign) long long pkBeginTime;
///个播随机PK匹配结束时间
@property (nonatomic, assign) long long pkMatchStartTime;
/// 是否有心愿礼物权限
@property (nonatomic,assign) BOOL hasWishGiftPermit;
///是否已经开启心愿礼物
@property (nonatomic,assign) BOOL hasOpenWishGift;
///寻爱之旅的配置
@property (nonatomic,strong) CandyTreeSwitchModel *findLoveDrawSwitchVo;
///夺宝精灵的配置

View File

@@ -29,7 +29,6 @@
#import "XPRoomMiniManager.h"
#import "Api+RoomPK.h"
#import "Api+Room.h"
#import "Api+WishGift.h"
#import "NSObject+MJExtension.h"
#import "NSArray+Safe.h"
#import "NSMutableDictionary+Saft.h"
@@ -51,8 +50,6 @@
#import "GiftInfoModel.h"
#import "RoomPKTeamModel.h"
#import "RoomNewUserGreetModel.h"
#import "WishGiftInfoModel.h"
#import "WishGiftInfoUpdateModel.h"
///View
#import "XPRoomHalfWebView.h"
#import "XPAnchorAudienceUpMicView.h"
@@ -80,8 +77,6 @@
#import "XPRoomHalfMessageView.h"
#import "XPAcrossRoomPKCountDownView.h"
#import "XPNewUserRoomGiftView.h"
#import "XPWishGiftViewController.h"
#import "XPWishGiftEnterView.h"
///PK
#import "XPAnchorFansTeamEntranceView.h"
#import "XPAnchorFansTeamViewController.h"

View File

@@ -17,7 +17,6 @@
#import "XPGiftStorage.h"
#import "XPRoomFaceTool.h"
#import "TTPopup.h"
#import "Api+WishGift.h"
#import "NSArray+Safe.h"
#import "ClientConfig.h"
///Model

View File

@@ -0,0 +1,53 @@
//
// XPPKAction.h
// YUMI
//
// Created by YUMI on 2024/01/01.
//
#import "XPRoomMoreMenuAction.h"
@class RoomInfoModel;
NS_ASSUME_NONNULL_BEGIN
@interface XPPKAction : XPRoomMoreMenuAction
// MARK: - 同房PK模式
/// 开启同房PK模式
+ (instancetype)roomPKOpenAction;
/// 关闭同房PK模式
+ (instancetype)roomPKCloseAction;
// MARK: - 跨房PK
/// 开启跨房PK
+ (instancetype)acrossRoomPKOpenAction;
/// 关闭跨房PK
+ (instancetype)acrossRoomPKCloseAction;
// MARK: - 主播PK
/// 开启主播PK
+ (instancetype)anchorPKOpenAction;
/// 关闭主播PK
+ (instancetype)anchorPKCloseAction;
// MARK: - 相亲模式
/// 开启相亲模式
+ (instancetype)datingOpenAction;
/// 关闭相亲模式
+ (instancetype)datingCloseAction;
// MARK: - 根据房间信息创建对应的Action
/// 根据房间信息创建对应的PK Action
/// @param roomInfo 房间信息
+ (instancetype)roomPKActionWithRoomInfo:(RoomInfoModel *)roomInfo;
+ (instancetype)corssPKActionWithRoomInfo:(RoomInfoModel *)roomInfo;
+ (instancetype)blindActionWithRoomInfo:(RoomInfoModel *)roomInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,325 @@
//
// XPPKAction.m
// YUMI
//
// Created by YUMI on 2024/01/01.
//
#import "XPPKAction.h"
#import "XPRoomMoreMenuActionContext.h"
#import "RoomInfoModel.h"
#import "DJDKMIMOMColor.h"
#import "TTPopup.h"
#import "BaseViewController.h"
#import "XPRoomPKViewController.h"
#import "XPAcrossRoomPKViewController.h"
#import "XPAnchorPKViewController.h"
#import "AccountInfoStorage.h"
@implementation XPPKAction
#pragma mark - PK
+ (instancetype)roomPKOpenAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter1");
action.imageName = @"room_pk_menu_icon";
action.type = RoomMoreMenuType_Room_PK_Open;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
+ (instancetype)roomPKCloseAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter26");
action.imageName = @"room_pk_menu_icon";
action.type = RoomMoreMenuType_Room_PK_Close;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
#pragma mark - PK
+ (instancetype)acrossRoomPKOpenAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter31");
action.imageName = @"crossroom_pk_menu_icon";
action.type = RoomMoreMenuType_Room_Across_PK_Open;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
+ (instancetype)acrossRoomPKCloseAction{
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter31");
action.imageName = @"crossroom_pk_menu_icon";
action.type = RoomMoreMenuType_Room_Across_PK_Close;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
#pragma mark - PK
+ (instancetype)anchorPKOpenAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter33");
action.imageName = @"room_more_menu_anchor_pk";
action.type = RoomMoreMenuType_Room_Anchor_PK_Open;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
+ (instancetype)anchorPKCloseAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter32");
action.imageName = @"room_more_menu_anchor_pk";
action.type = RoomMoreMenuType_Room_Anchor_PK_Close;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
#pragma mark -
+ (instancetype)datingOpenAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter8");
action.imageName = @"room_more_menu_dating";
action.type = RoomMoreMenuType_Room_Dating_Open;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
+ (instancetype)datingCloseAction {
XPPKAction *action = [[XPPKAction alloc] init];
action.title = YMLocalizedString(@"XPMoreMenuPresenter29");
action.imageName = @"room_more_menu_dating";
action.type = RoomMoreMenuType_Room_Dating_Close;
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
return action;
}
#pragma mark - Action
+ (instancetype)roomPKActionWithRoomInfo:(RoomInfoModel *)roomInfo {
return roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? [self roomPKOpenAction] : [self roomPKCloseAction];
}
+ (instancetype)corssPKActionWithRoomInfo:(RoomInfoModel *)roomInfo {
return roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? [self acrossRoomPKCloseAction] : [self acrossRoomPKOpenAction];
}
+ (instancetype)blindActionWithRoomInfo:(RoomInfoModel *)roomInfo {
return roomInfo.roomModeType == RoomModeType_Open_Blind ? [self datingCloseAction] : [self datingOpenAction];
}
#pragma mark - XPRoomMoreMenuAction
- (BOOL)canExecuteWithContext:(XPRoomMoreMenuActionContext *)context {
NSLog(@"=== XPPKAction canExecuteWithContext ===");
NSLog(@"Action 类型: %ld, 标题: %@", (long)self.type, self.title);
// PKAction
return YES;
}
- (void)executeWithContext:(XPRoomMoreMenuActionContext *)context {
NSLog(@"=== XPPKAction executeWithContext ===");
NSLog(@"Action 类型: %ld, 标题: %@", (long)self.type, self.title);
switch (self.type) {
case RoomMoreMenuType_Room_PK_Open:
[self executeRoomPKOpen:context];
break;
case RoomMoreMenuType_Room_PK_Close:
[self executeRoomPKClose:context];
break;
case RoomMoreMenuType_Room_Across_PK_Open:
[self executeAcrossRoomPKOpen:context];
break;
case RoomMoreMenuType_Room_Across_PK_Close:
[self executeAcrossRoomPKClose:context];
break;
case RoomMoreMenuType_Room_Anchor_PK_Open:
[self executeAnchorPKOpen:context];
break;
case RoomMoreMenuType_Room_Anchor_PK_Close:
[self executeAnchorPKClose:context];
break;
case RoomMoreMenuType_Room_Dating_Open:
[self executeDatingOpen:context];
break;
case RoomMoreMenuType_Room_Dating_Close:
[self executeDatingClose:context];
break;
default:
NSLog(@"❌ 未知的PK Action类型: %ld", (long)self.type);
break;
}
}
#pragma mark -
- (void)executeRoomPKOpen:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行开启同房PK模式");
//
if (context.roomInfo.roomModeType == RoomModeType_Open_Blind) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController20") context:context];
[self dismissViewController:context];
return;
}
if (context.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController21") context:context];
[self dismissViewController:context];
return;
}
// PK
[self dismissViewController:context];
XPRoomPKViewController *roomPKVC = [[XPRoomPKViewController alloc] initWithDelegate:context.hostDelegate];
[context.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
}
- (void)executeRoomPKClose:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行关闭同房PK模式");
// PK
[self dismissViewController:context];
XPRoomPKViewController *roomPKVC = [[XPRoomPKViewController alloc] initWithDelegate:context.hostDelegate];
[context.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
}
- (void)executeAcrossRoomPKOpen:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行开启跨房PK");
//
if (context.roomInfo.roomModeType == RoomModeType_Open_Blind) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController13") context:context];
[self dismissViewController:context];
return;
}
if (context.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController14") context:context];
[self dismissViewController:context];
return;
}
// PK
[self dismissViewController:context];
NSString *roomUid = [NSString stringWithFormat:@"%ld", context.roomInfo.uid];
XPAcrossRoomPKViewController *acrossRoomPKVC = [[XPAcrossRoomPKViewController alloc] initWithRoomUid:roomUid];
[context.hostDelegate.getCurrentNav presentViewController:acrossRoomPKVC animated:YES completion:nil];
}
- (void)executeAcrossRoomPKClose:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行关闭跨房PK");
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController15") context:context];
[self dismissViewController:context];
}
- (void)executeAnchorPKOpen:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行开启主播PK");
if (context.hostDelegate.getRoomInfo.pkMatchStartTime) {
// PK
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.message = YMLocalizedString(@"XPRoomMoreMenuViewController16");
[TTPopup alertWithConfig:config confirmHandler:^{
NSString *roomUid = [NSString stringWithFormat:@"%ld", context.roomInfo.uid];
// [context.hostDelegate requestCancelMatchRandomPK:roomUid];
} cancelHandler:^{
}];
} else {
// PK
[self dismissViewController:context];
NSString *roomUid = [NSString stringWithFormat:@"%ld", context.roomInfo.uid];
XPAnchorPKViewController *anchorPKVC = [[XPAnchorPKViewController alloc] initWithRoomUid:roomUid];
[context.hostDelegate.getCurrentNav presentViewController:anchorPKVC animated:YES completion:nil];
}
}
- (void)executeAnchorPKClose:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行关闭主播PK");
if (context.roomInfo.pkState == AcrossRoomPkStateTypePenalty) {
if ([context.roomInfo.winUid isEqualToString:[AccountInfoStorage instance].getUid]) {
//
if (context.roomInfo.roundId) {
// [context.hostDelegate requestFinishAnchorPK:[NSString stringWithFormat:@"%ld", context.roomInfo.roundId]];
}
} else if ([context.roomInfo.winUid isEqualToString:context.roomInfo.pkUid]) {
//
} else {
//
if (context.roomInfo.roundId) {
// [context.hostDelegate requestFinishAnchorPK:[NSString stringWithFormat:@"%ld", context.roomInfo.roundId]];
}
}
} else {
if (context.roomInfo.roundId) {
// [context.hostDelegdate requestFinishAnchorPK:[NSString stringWithFormat:@"%ld", context.roomInfo.roundId]];
}
}
}
- (void)executeDatingOpen:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行开启相亲模式");
//
if (context.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController6") context:context];
[self dismissViewController:context];
return;
}
if (context.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController7") context:context];
[self dismissViewController:context];
return;
}
//
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.message = YMLocalizedString(@"XPRoomMoreMenuViewController8");
config.confirmButtonConfig.title = YMLocalizedString(@"XPRoomMoreMenuViewController9");
[TTPopup alertWithConfig:config confirmHandler:^{
NSString *roomUid = [NSString stringWithFormat:@"%ld", context.roomInfo.uid];
// [context.hostDelegate openRoomDating:roomUid];
} cancelHandler:^{
}];
}
- (void)executeDatingClose:(XPRoomMoreMenuActionContext *)context {
NSLog(@"执行关闭相亲模式");
//
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.title = YMLocalizedString(@"XPRoomMoreMenuViewController10");
config.message = YMLocalizedString(@"XPRoomMoreMenuViewController11");
config.confirmButtonConfig.title = YMLocalizedString(@"XPRoomMoreMenuViewController12");
[TTPopup alertWithConfig:config confirmHandler:^{
NSString *roomUid = [NSString stringWithFormat:@"%ld", context.roomInfo.uid];
// [context.hostDelegate closeRoomDating:roomUid];
} cancelHandler:^{
}];
}
#pragma mark -
- (void)showErrorToast:(NSString *)message context:(XPRoomMoreMenuActionContext *)context {
if (context.presentingViewController && [context.presentingViewController respondsToSelector:@selector(showErrorToast:)]) {
BaseViewController *viewController = (BaseViewController *)context.presentingViewController;
[viewController showErrorToast:message];
}
}
- (void)dismissViewController:(XPRoomMoreMenuActionContext *)context {
if (context.presentingViewController && [context.presentingViewController respondsToSelector:@selector(dismissViewControllerAnimated:completion:)]) {
BaseViewController *viewController = (BaseViewController *)context.presentingViewController;
[viewController dismissViewControllerAnimated:NO completion:nil];
}
}
@end

View File

@@ -11,6 +11,7 @@
#import "XPGiftEffectAction.h"
#import "XPRoomSettingAction.h"
#import "XPSocialAction.h"
#import "XPPKAction.h"
#import "RoomInfoModel.h"
@implementation XPRoomMoreMenuActionFactory
@@ -28,13 +29,23 @@
[actions addObject:[XPRoomSettingAction action]];
// 3. - 使
[actions addObject:[XPSocialAction inviteFansAction]];
[actions addObject:[XPSocialAction releaseRadioAction]];
// [actions addObject:[XPSocialAction inviteFansAction]];
// [actions addObject:[XPSocialAction releaseRadioAction]];
[actions addObject:[XPSocialAction trumpetAction]];
[actions addObject:[XPSocialAction reportAction]];
// 4. PK - Action
[actions addObject:[XPPKAction roomPKActionWithRoomInfo:context.roomInfo]];
XPPKAction *crossAction = [XPPKAction corssPKActionWithRoomInfo:context.roomInfo];
if (crossAction) {
[actions addObject:crossAction];
}
XPPKAction *blindAction = [XPPKAction blindActionWithRoomInfo:context.roomInfo];
if (blindAction) {
[actions addObject:blindAction];
}
// TODO:
// [actions addObject:[XPPKAction action]];
// ...
return actions;

View File

@@ -53,7 +53,7 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
///扬声器
RoomMoreMenuType_Room_Voice = 21,
///心愿礼物
RoomMoreMenuType_Room_Wish_Gift = 22,
// RoomMoreMenuType_Room_Wish_Gift = 22,
///举报
RoomMoreMenuType_Room_report = 23,
///房间相册

View File

@@ -44,13 +44,14 @@ NS_ASSUME_NONNULL_BEGIN
* 便利构造方法
*/
+ (instancetype)contextWithRoomInfo:(RoomInfoModel *)roomInfo
userInfo:(UserInfoModel *)userInfo
hostDelegate:(id<RoomHostDelegate>)hostDelegate
presentingViewController:(id)presentingViewController
userInfo:(UserInfoModel * _Nullable)userInfo
hostDelegate:(id<RoomHostDelegate> _Nullable)hostDelegate
presentingViewController:(id _Nullable)presentingViewController
isOnMic:(BOOL)isOnMic
isSuperAdmin:(BOOL)isSuperAdmin
isAppSuperAdmin:(BOOL)isAppSuperAdmin;
@end
NS_ASSUME_NONNULL_END

View File

@@ -6,13 +6,14 @@
//
#import "XPRoomMoreMenuActionContext.h"
#import "XPMoreMenuPresenter.h"
@implementation XPRoomMoreMenuActionContext
+ (instancetype)contextWithRoomInfo:(RoomInfoModel *)roomInfo
userInfo:(UserInfoModel *)userInfo
hostDelegate:(id<RoomHostDelegate>)hostDelegate
presentingViewController:(id)presentingViewController
userInfo:(UserInfoModel * _Nullable)userInfo
hostDelegate:(id<RoomHostDelegate> _Nullable)hostDelegate
presentingViewController:(id _Nullable)presentingViewController
isOnMic:(BOOL)isOnMic
isSuperAdmin:(BOOL)isSuperAdmin
isAppSuperAdmin:(BOOL)isAppSuperAdmin {
@@ -29,4 +30,5 @@
return context;
}
@end

View File

@@ -28,11 +28,34 @@
@implementation XPMoreMenuPresenter
- (void)loadNIMMemberData:(void(^)(NSArray<NIMChatroomMember *> * _Nullable members))finish withRoomInfo:(RoomInfoModel *)roomInfo{
if (!finish) {
return;
}
NSString * uid = [AccountInfoStorage instance].getUid;
if (uid.length <= 0) {
finish(nil);
return;
}
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = roomId;
request.userIds = @[uid];
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
if (members) {
finish(members);
} else {
finish(nil);
}
}];
}
- (void)getMoreMenuDataSourceWithNewArchitecture:(RoomInfoModel *)roomInfo
isSuperAdmin:(BOOL)isSuperAdmin
isOnMic:(BOOL)isOnMic
isAppSuperAdmin:(BOOL)isAppSuperAdmin {
//
XPRoomMoreMenuActionContext *context = [XPRoomMoreMenuActionContext
contextWithRoomInfo:roomInfo
@@ -46,15 +69,74 @@
// 使 Action
NSArray<XPRoomMoreMenuAction *> *actions = [XPRoomMoreMenuActionFactory
createActionsWithContext:context];
//
NSMutableArray *models = [NSMutableArray array];
for (XPRoomMoreMenuAction *action in actions) {
[models addObject:[action toItemModel]];
}
// for (XPRoomMoreMenuAction *action in actions) {
// [models addObject:[action toItemModel]];
// }
//
[[self getView] getMoreMenuDataSuccess:models];
if (isAppSuperAdmin) {
// TODO: 使 models (trumpet, giftEffect, appManager, report)
//
[[self getView] getMoreMenuDataSuccess:models];
} else {
[self loadNIMMemberData:^(NSArray<NIMChatroomMember *> * _Nullable members) {
BOOL isCreator = NO;
BOOL isManager = NO;
if (members) {
NIMChatroomMember * member = members.firstObject;
if (member) {
isCreator = member.type == NIMChatroomMemberTypeCreator;
isManager = member.type == NIMChatroomMemberTypeManager;
if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
// TODO: models roomPK
}
if (isCreator && roomInfo.type != RoomType_MiniGame) {
if(roomInfo.type != RoomType_Anchor){
// TODO: models acrossRoomPK
}
}
if (isOnMic) {
// TODO: models musicPanel
}
if (isCreator && roomInfo.type == RoomType_Anchor) {
// TODO: models anchorRoomPK
}
if (isCreator || isManager || isSuperAdmin) {
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {
// TODO: models dating index = 1
}
// TODO: models trumpetgiftEffectroomSettingbgValueclearScreen
} else {
// TODO: models trumpetgiftEffect
}
} else {
// TODO: models report giftEffect
}
} else {
// TODO: models report giftEffect
}
if ((isCreator || isManager || isSuperAdmin) && // &
roomInfo.isPermitRoom != PermitRoomType_License && //
roomInfo.roomModeType != RoomModeType_Open_Blind && //
roomInfo.type != RoomType_MiniGame && // 10/15
roomInfo.type != RoomType_Anchor) {
// TODO: models roomTypeSetting
}
if(roomInfo.hasRoomAlbum == YES){
// TODO: models roomPhotoAlbum
}
if ([ClientConfig shareConfig].configInfo.redEnvelopeConfig.open &&
roomInfo.redEnvelopeOpen) {
// TODO: models redPacket index = 1
}
[[self getView] getMoreMenuDataSuccess:models];
} withRoomInfo:roomInfo];
}
}
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin isOnMic:(BOOL)isOnMic isAppSuperAdmin:(BOOL)isAppSuperAdmin{
@@ -81,12 +163,6 @@
giftEffect.imageName = @"room_more_menu_gift_effect";
giftEffect.type = roomInfo.hasAnimationEffect ? RoomMoreMenuType_Gift_Effect_Close : RoomMoreMenuType_Gift_Effect_Open;
giftEffect.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * wishGift = [[XPRoomMoreItemModel alloc] init];
wishGift.title = YMLocalizedString(@"XPMoreMenuPresenter6");
wishGift.imageName = @"room_more_menu_wish_gift";
wishGift.type = RoomMoreMenuType_Room_Wish_Gift;
wishGift.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * dating = [[XPRoomMoreItemModel alloc] init];
dating.title = roomInfo.roomModeType == RoomModeType_Open_Blind ? YMLocalizedString(@"XPMoreMenuPresenter29") : YMLocalizedString(@"XPMoreMenuPresenter8");
@@ -125,18 +201,6 @@
roomSetting.imageName = @"room_more_menu_setting";
roomSetting.type = RoomMoreMenuType_Room_Setting;
roomSetting.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * inviteFriend = [[XPRoomMoreItemModel alloc] init];
inviteFriend.title = YMLocalizedString(@"XPMoreMenuPresenter22");
inviteFriend.imageName = @"room_more_menu_invite_friend";
inviteFriend.type = RoomMoreMenuType_Invite_Fans;
inviteFriend.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * releaseRadio = [[XPRoomMoreItemModel alloc] init];
releaseRadio.title = YMLocalizedString(@"XPMoreMenuPresenter23");
releaseRadio.imageName = @"room_more_menu_release_radio";
releaseRadio.type = RoomMoreMenuType_Release_Radio;
releaseRadio.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * trumpet = [[XPRoomMoreItemModel alloc] init];
trumpet.title = YMLocalizedString(@"XPMoreMenuPresenter35");
@@ -230,10 +294,6 @@
[array addObject:anchorRoomPK];
indexOfRoomAlbum += 1;
}
if ((isCreator || isManager || isSuperAdmin) && roomInfo.hasWishGiftPermit) {
[array addObject:wishGift];
}
if (isCreator || isManager || isSuperAdmin) {
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {

View File

@@ -34,7 +34,6 @@
#import "XPReleaseRadioViewController.h"
#import "XPRoomPKViewController.h"
#import "BaseNavigationController.h"
#import "XPWishGiftCreateViewController.h"
#import "XPAnchorPKSelectTypeController.h"
#import "XPRoomTrumpetViewController.h"
#import "XPWebViewController.h"
@@ -49,6 +48,9 @@
#import "RoomModeViewController.h"
#import "XPRoomMoreMenuActionTest.h"
#import "XPRoomMoreMenuActionFactory.h"
#import "XPRoomMoreMenuAction.h"
#import "XPPKAction.h"
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
@@ -93,7 +95,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
[self initSubViewConstraints];
//
// [self testNewArchitecture];
[self testNewArchitecture];
///
BOOL meIsSuperAdmin = NO;
@@ -578,14 +580,6 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
item.isSelected = [RtcManager instance].isRemoteMuted;
}
break;
case RoomMoreMenuType_Room_Wish_Gift:
{
[self dismissViewControllerAnimated:YES completion:nil];
XPWishGiftCreateViewController *wishGiftVC = [[XPWishGiftCreateViewController alloc] initWithDelegate:self.hostDelegate];
[self.hostDelegate.getCurrentNav pushViewController:wishGiftVC animated:YES];
}
break;
case RoomMoreMenuType_Room_report:
{
[self dismissViewControllerAnimated:YES completion:nil];