提交修改部分文件名和属性名

This commit is contained in:
linyudan
2023-12-01 18:18:35 -08:00
parent 0fe2be212f
commit 3535ccaf7e
89 changed files with 828 additions and 3098 deletions

View File

@@ -7,27 +7,27 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
23270C292B0E037300B9303B /* MessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C272B0E037300B9303B /* MessageConentAudioView.m */; }; 23270C292B0E037300B9303B /* CHMessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C272B0E037300B9303B /* CHMessageConentAudioView.m */; };
23270C2C2B0E041300B9303B /* MessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2B2B0E041300B9303B /* MessageAudioCenter.m */; }; 23270C2C2B0E041300B9303B /* CHMessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2B2B0E041300B9303B /* CHMessageAudioCenter.m */; };
23270C302B0E071B00B9303B /* MewPaymentAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */; }; 23270C302B0E071B00B9303B /* MewPaymentAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */; };
23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C332B0EFD9A00B9303B /* NewEncryptTool.m */; }; 23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C332B0EFD9A00B9303B /* NewEncryptTool.m */; };
233757562B0CB577001D0B7F /* MessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757262B0CB577001D0B7F /* MessagePresenter.m */; }; 233757562B0CB577001D0B7F /* CHMessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757262B0CB577001D0B7F /* CHMessagePresenter.m */; };
233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572C2B0CB577001D0B7F /* MessageMenuModel.m */; }; 233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572C2B0CB577001D0B7F /* MessageMenuModel.m */; };
233757582B0CB577001D0B7F /* ChatLimitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572D2B0CB577001D0B7F /* ChatLimitModel.m */; }; 233757582B0CB577001D0B7F /* ChatLimitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572D2B0CB577001D0B7F /* ChatLimitModel.m */; };
233757592B0CB577001D0B7F /* NIMBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757312B0CB577001D0B7F /* NIMBadgeView.m */; }; 233757592B0CB577001D0B7F /* NIMBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757312B0CB577001D0B7F /* NIMBadgeView.m */; };
2337575A2B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757342B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m */; }; 2337575A2B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757342B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m */; };
2337575B2B0CB577001D0B7F /* UIView+NIM.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757362B0CB577001D0B7F /* UIView+NIM.m */; }; 2337575B2B0CB577001D0B7F /* UIView+NIM.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757362B0CB577001D0B7F /* UIView+NIM.m */; };
2337575C2B0CB577001D0B7F /* SessionMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757392B0CB577001D0B7F /* SessionMessageCell.m */; }; 2337575C2B0CB577001D0B7F /* CHSessionMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757392B0CB577001D0B7F /* CHSessionMessageCell.m */; };
2337575D2B0CB577001D0B7F /* SessionToolbarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573B2B0CB577001D0B7F /* SessionToolbarView.m */; }; 2337575D2B0CB577001D0B7F /* CHSessionToolbarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573B2B0CB577001D0B7F /* CHSessionToolbarView.m */; };
2337575E2B0CB577001D0B7F /* NIMMessageMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */; }; 2337575E2B0CB577001D0B7F /* NIMMessageMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */; };
2337575F2B0CB577001D0B7F /* SessionInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573D2B0CB577001D0B7F /* SessionInfoViewController.m */; }; 2337575F2B0CB577001D0B7F /* CHSessionInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573D2B0CB577001D0B7F /* CHSessionInfoViewController.m */; };
233757602B0CB577001D0B7F /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573E2B0CB577001D0B7F /* SessionViewController.m */; }; 233757602B0CB577001D0B7F /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573E2B0CB577001D0B7F /* SessionViewController.m */; };
233757612B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757402B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m */; }; 233757612B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757402B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m */; };
233757622B0CB577001D0B7F /* MessageContentImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757412B0CB577001D0B7F /* MessageContentImage.m */; }; 233757622B0CB577001D0B7F /* CHMessageContentImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757412B0CB577001D0B7F /* CHMessageContentImage.m */; };
233757632B0CB577001D0B7F /* MessageContentUnSupportView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757472B0CB577001D0B7F /* MessageContentUnSupportView.m */; }; 233757632B0CB577001D0B7F /* CHMessageContentUnSupportView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757472B0CB577001D0B7F /* CHMessageContentUnSupportView.m */; };
233757642B0CB577001D0B7F /* MessageContentText.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757482B0CB577001D0B7F /* MessageContentText.m */; }; 233757642B0CB577001D0B7F /* CHMessageContentText.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757482B0CB577001D0B7F /* CHMessageContentText.m */; };
233757652B0CB577001D0B7F /* SessionNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757492B0CB577001D0B7F /* SessionNavView.m */; }; 233757652B0CB577001D0B7F /* CHSessionNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757492B0CB577001D0B7F /* CHSessionNavView.m */; };
233757662B0CB577001D0B7F /* SessionAudioRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337574F2B0CB577001D0B7F /* SessionAudioRecordView.m */; }; 233757662B0CB577001D0B7F /* CHSessionAudioRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337574F2B0CB577001D0B7F /* CHSessionAudioRecordView.m */; };
233757672B0CB577001D0B7F /* Api+Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757512B0CB577001D0B7F /* Api+Message.m */; }; 233757672B0CB577001D0B7F /* Api+Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757512B0CB577001D0B7F /* Api+Message.m */; };
233757682B0CB577001D0B7F /* NIMMessageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757542B0CB577001D0B7F /* NIMMessageUtils.m */; }; 233757682B0CB577001D0B7F /* NIMMessageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757542B0CB577001D0B7F /* NIMMessageUtils.m */; };
2337576B2B0CB630001D0B7F /* UIView+FilletCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337576A2B0CB630001D0B7F /* UIView+FilletCorner.m */; }; 2337576B2B0CB630001D0B7F /* UIView+FilletCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337576A2B0CB630001D0B7F /* UIView+FilletCorner.m */; };
@@ -104,7 +104,7 @@
8C9C841C2B0C697A00A601BC /* RoomInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82F52B0C697A00A601BC /* RoomInfoModel.m */; }; 8C9C841C2B0C697A00A601BC /* RoomInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82F52B0C697A00A601BC /* RoomInfoModel.m */; };
8C9C841D2B0C697A00A601BC /* ThemeColor+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */; }; 8C9C841D2B0C697A00A601BC /* ThemeColor+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */; };
8C9C841E2B0C697A00A601BC /* YMRoomSendTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FB2B0C697A00A601BC /* YMRoomSendTextView.m */; }; 8C9C841E2B0C697A00A601BC /* YMRoomSendTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FB2B0C697A00A601BC /* YMRoomSendTextView.m */; };
8C9C841F2B0C697A00A601BC /* StageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FE2B0C697A00A601BC /* StageView.m */; }; 8C9C841F2B0C697A00A601BC /* CHStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FE2B0C697A00A601BC /* CHStageView.m */; };
8C9C84202B0C697A00A601BC /* MicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83022B0C697A00A601BC /* MicroView.m */; }; 8C9C84202B0C697A00A601BC /* MicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83022B0C697A00A601BC /* MicroView.m */; };
8C9C84212B0C697A00A601BC /* MicroQueueModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83052B0C697A00A601BC /* MicroQueueModel.m */; }; 8C9C84212B0C697A00A601BC /* MicroQueueModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83052B0C697A00A601BC /* MicroQueueModel.m */; };
8C9C84222B0C697A00A601BC /* MicroExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83062B0C697A00A601BC /* MicroExtModel.m */; }; 8C9C84222B0C697A00A601BC /* MicroExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83062B0C697A00A601BC /* MicroExtModel.m */; };
@@ -114,7 +114,6 @@
8C9C84262B0C697A00A601BC /* YMMessageRemoteExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83122B0C697A00A601BC /* YMMessageRemoteExtModel.m */; }; 8C9C84262B0C697A00A601BC /* YMMessageRemoteExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83122B0C697A00A601BC /* YMMessageRemoteExtModel.m */; };
8C9C84272B0C697A00A601BC /* YMNetImageYYLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83162B0C697A00A601BC /* YMNetImageYYLabel.m */; }; 8C9C84272B0C697A00A601BC /* YMNetImageYYLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83162B0C697A00A601BC /* YMNetImageYYLabel.m */; };
8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C831A2B0C697A00A601BC /* YMRoomMessageParser.m */; }; 8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C831A2B0C697A00A601BC /* YMRoomMessageParser.m */; };
8C9C84292B0C697A00A601BC /* YMRoomMiniManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C831E2B0C697A00A601BC /* YMRoomMiniManager.m */; };
8C9C842A2B0C697A00A601BC /* Api+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83212B0C697A00A601BC /* Api+Room.m */; }; 8C9C842A2B0C697A00A601BC /* Api+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83212B0C697A00A601BC /* Api+Room.m */; };
8C9C84302B0C697A00A601BC /* MewSessionListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */; }; 8C9C84302B0C697A00A601BC /* MewSessionListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */; };
8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83352B0C697A00A601BC /* MewSessionListViewController.m */; }; 8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83352B0C697A00A601BC /* MewSessionListViewController.m */; };
@@ -193,29 +192,27 @@
8C9C84972B0D65E200A601BC /* YMRoomAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84962B0D65E200A601BC /* YMRoomAnimationView.m */; }; 8C9C84972B0D65E200A601BC /* YMRoomAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84962B0D65E200A601BC /* YMRoomAnimationView.m */; };
8C9C849A2B0D675600A601BC /* YMRoomGiftAnimationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */; }; 8C9C849A2B0D675600A601BC /* YMRoomGiftAnimationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */; };
8C9C849E2B0D6A5C00A601BC /* YMGiftStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C849D2B0D6A5C00A601BC /* YMGiftStorage.m */; }; 8C9C849E2B0D6A5C00A601BC /* YMGiftStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C849D2B0D6A5C00A601BC /* YMGiftStorage.m */; };
8C9C84A32B0D894100A601BC /* RoomFaceSendInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84A22B0D894100A601BC /* RoomFaceSendInfoModel.m */; }; 8C9C84AD2B0D9AB900A601BC /* CHRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84AC2B0D9AB900A601BC /* CHRoomMessageHeaderView.m */; };
8C9C84A72B0D920700A601BC /* MicroWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84A62B0D920700A601BC /* MicroWaveView.m */; };
8C9C84AA2B0D930B00A601BC /* MicroNobleWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84A92B0D930B00A601BC /* MicroNobleWaveView.m */; };
8C9C84AD2B0D9AB900A601BC /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84AC2B0D9AB900A601BC /* XPRoomMessageHeaderView.m */; };
8C9C84B12B0DEAE100A601BC /* YMIButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B02B0DEAE100A601BC /* YMIButton.m */; }; 8C9C84B12B0DEAE100A601BC /* YMIButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B02B0DEAE100A601BC /* YMIButton.m */; };
8C9C84B42B0E951200A601BC /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C84B32B0E951200A601BC /* StoreKit.framework */; }; 8C9C84B42B0E951200A601BC /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C84B32B0E951200A601BC /* StoreKit.framework */; };
8C9C84BA2B0ECD2100A601BC /* MineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B92B0ECD2100A601BC /* MineRechargePresenter.m */; }; 8C9C84BA2B0ECD2100A601BC /* MineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B92B0ECD2100A601BC /* MineRechargePresenter.m */; };
8CAB96F52B1AB15200ED8639 /* CHRoomAnimationGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CAB96F42B1AB15200ED8639 /* CHRoomAnimationGroup.m */; };
FFDAAB800AD6BB4653B4427F /* Pods_yinmeng_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */; }; FFDAAB800AD6BB4653B4427F /* Pods_yinmeng_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_yinmeng_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_yinmeng_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23270C272B0E037300B9303B /* MessageConentAudioView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageConentAudioView.m; sourceTree = "<group>"; }; 23270C272B0E037300B9303B /* CHMessageConentAudioView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageConentAudioView.m; sourceTree = "<group>"; };
23270C282B0E037300B9303B /* MessageConentAudioView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageConentAudioView.h; sourceTree = "<group>"; }; 23270C282B0E037300B9303B /* CHMessageConentAudioView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageConentAudioView.h; sourceTree = "<group>"; };
23270C2A2B0E041300B9303B /* MessageAudioCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageAudioCenter.h; sourceTree = "<group>"; }; 23270C2A2B0E041300B9303B /* CHMessageAudioCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageAudioCenter.h; sourceTree = "<group>"; };
23270C2B2B0E041300B9303B /* MessageAudioCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageAudioCenter.m; sourceTree = "<group>"; }; 23270C2B2B0E041300B9303B /* CHMessageAudioCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageAudioCenter.m; sourceTree = "<group>"; };
23270C2E2B0E071B00B9303B /* yinmeng-ios-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "yinmeng-ios-Bridging-Header.h"; sourceTree = "<group>"; }; 23270C2E2B0E071B00B9303B /* yinmeng-ios-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "yinmeng-ios-Bridging-Header.h"; sourceTree = "<group>"; };
23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MewPaymentAction.swift; sourceTree = "<group>"; }; 23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MewPaymentAction.swift; sourceTree = "<group>"; };
23270C322B0EFD9A00B9303B /* NewEncryptTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewEncryptTool.h; sourceTree = "<group>"; }; 23270C322B0EFD9A00B9303B /* NewEncryptTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewEncryptTool.h; sourceTree = "<group>"; };
23270C332B0EFD9A00B9303B /* NewEncryptTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewEncryptTool.m; sourceTree = "<group>"; }; 23270C332B0EFD9A00B9303B /* NewEncryptTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewEncryptTool.m; sourceTree = "<group>"; };
233757262B0CB577001D0B7F /* MessagePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessagePresenter.m; sourceTree = "<group>"; }; 233757262B0CB577001D0B7F /* CHMessagePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessagePresenter.m; sourceTree = "<group>"; };
233757272B0CB577001D0B7F /* MessagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessagePresenter.h; sourceTree = "<group>"; }; 233757272B0CB577001D0B7F /* CHMessagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessagePresenter.h; sourceTree = "<group>"; };
233757292B0CB577001D0B7F /* MessageProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageProtocol.h; sourceTree = "<group>"; }; 233757292B0CB577001D0B7F /* CHMessageProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageProtocol.h; sourceTree = "<group>"; };
2337572B2B0CB577001D0B7F /* ChatLimitModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatLimitModel.h; sourceTree = "<group>"; }; 2337572B2B0CB577001D0B7F /* ChatLimitModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatLimitModel.h; sourceTree = "<group>"; };
2337572C2B0CB577001D0B7F /* MessageMenuModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageMenuModel.m; sourceTree = "<group>"; }; 2337572C2B0CB577001D0B7F /* MessageMenuModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageMenuModel.m; sourceTree = "<group>"; };
2337572D2B0CB577001D0B7F /* ChatLimitModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatLimitModel.m; sourceTree = "<group>"; }; 2337572D2B0CB577001D0B7F /* ChatLimitModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatLimitModel.m; sourceTree = "<group>"; };
@@ -226,29 +223,29 @@
233757342B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+NIMScrollToBottom.m"; sourceTree = "<group>"; }; 233757342B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+NIMScrollToBottom.m"; sourceTree = "<group>"; };
233757352B0CB577001D0B7F /* NIMBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMBadgeView.h; sourceTree = "<group>"; }; 233757352B0CB577001D0B7F /* NIMBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMBadgeView.h; sourceTree = "<group>"; };
233757362B0CB577001D0B7F /* UIView+NIM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NIM.m"; sourceTree = "<group>"; }; 233757362B0CB577001D0B7F /* UIView+NIM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NIM.m"; sourceTree = "<group>"; };
233757382B0CB577001D0B7F /* SessionNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionNavView.h; sourceTree = "<group>"; }; 233757382B0CB577001D0B7F /* CHSessionNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionNavView.h; sourceTree = "<group>"; };
233757392B0CB577001D0B7F /* SessionMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMessageCell.m; sourceTree = "<group>"; }; 233757392B0CB577001D0B7F /* CHSessionMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionMessageCell.m; sourceTree = "<group>"; };
2337573A2B0CB577001D0B7F /* SessionAudioRecordView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionAudioRecordView.h; sourceTree = "<group>"; }; 2337573A2B0CB577001D0B7F /* CHSessionAudioRecordView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionAudioRecordView.h; sourceTree = "<group>"; };
2337573B2B0CB577001D0B7F /* SessionToolbarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionToolbarView.m; sourceTree = "<group>"; }; 2337573B2B0CB577001D0B7F /* CHSessionToolbarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionToolbarView.m; sourceTree = "<group>"; };
2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMMessageMaker.m; sourceTree = "<group>"; }; 2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMMessageMaker.m; sourceTree = "<group>"; };
2337573D2B0CB577001D0B7F /* SessionInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionInfoViewController.m; sourceTree = "<group>"; }; 2337573D2B0CB577001D0B7F /* CHSessionInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionInfoViewController.m; sourceTree = "<group>"; };
2337573E2B0CB577001D0B7F /* SessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = "<group>"; }; 2337573E2B0CB577001D0B7F /* SessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = "<group>"; };
233757402B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageToolMenuCollectionViewCell.m; sourceTree = "<group>"; }; 233757402B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageToolMenuCollectionViewCell.m; sourceTree = "<group>"; };
233757412B0CB577001D0B7F /* MessageContentImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageContentImage.m; sourceTree = "<group>"; }; 233757412B0CB577001D0B7F /* CHMessageContentImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageContentImage.m; sourceTree = "<group>"; };
233757422B0CB577001D0B7F /* MessageContentText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentText.h; sourceTree = "<group>"; }; 233757422B0CB577001D0B7F /* CHMessageContentText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentText.h; sourceTree = "<group>"; };
233757432B0CB577001D0B7F /* MessageContentUnSupportView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentUnSupportView.h; sourceTree = "<group>"; }; 233757432B0CB577001D0B7F /* CHMessageContentUnSupportView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentUnSupportView.h; sourceTree = "<group>"; };
233757442B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageToolMenuCollectionViewCell.h; sourceTree = "<group>"; }; 233757442B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageToolMenuCollectionViewCell.h; sourceTree = "<group>"; };
233757452B0CB577001D0B7F /* MessageContentProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentProtocol.h; sourceTree = "<group>"; }; 233757452B0CB577001D0B7F /* CHMessageContentProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentProtocol.h; sourceTree = "<group>"; };
233757462B0CB577001D0B7F /* MessageContentImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentImage.h; sourceTree = "<group>"; }; 233757462B0CB577001D0B7F /* CHMessageContentImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentImage.h; sourceTree = "<group>"; };
233757472B0CB577001D0B7F /* MessageContentUnSupportView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageContentUnSupportView.m; sourceTree = "<group>"; }; 233757472B0CB577001D0B7F /* CHMessageContentUnSupportView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageContentUnSupportView.m; sourceTree = "<group>"; };
233757482B0CB577001D0B7F /* MessageContentText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageContentText.m; sourceTree = "<group>"; }; 233757482B0CB577001D0B7F /* CHMessageContentText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageContentText.m; sourceTree = "<group>"; };
233757492B0CB577001D0B7F /* SessionNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionNavView.m; sourceTree = "<group>"; }; 233757492B0CB577001D0B7F /* CHSessionNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionNavView.m; sourceTree = "<group>"; };
2337574A2B0CB577001D0B7F /* SessionMessageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionMessageCell.h; sourceTree = "<group>"; }; 2337574A2B0CB577001D0B7F /* CHSessionMessageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionMessageCell.h; sourceTree = "<group>"; };
2337574B2B0CB577001D0B7F /* SessionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = "<group>"; }; 2337574B2B0CB577001D0B7F /* SessionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = "<group>"; };
2337574C2B0CB577001D0B7F /* SessionInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionInfoViewController.h; sourceTree = "<group>"; }; 2337574C2B0CB577001D0B7F /* CHSessionInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionInfoViewController.h; sourceTree = "<group>"; };
2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMMessageMaker.h; sourceTree = "<group>"; }; 2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMMessageMaker.h; sourceTree = "<group>"; };
2337574E2B0CB577001D0B7F /* SessionToolbarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionToolbarView.h; sourceTree = "<group>"; }; 2337574E2B0CB577001D0B7F /* CHSessionToolbarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionToolbarView.h; sourceTree = "<group>"; };
2337574F2B0CB577001D0B7F /* SessionAudioRecordView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionAudioRecordView.m; sourceTree = "<group>"; }; 2337574F2B0CB577001D0B7F /* CHSessionAudioRecordView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionAudioRecordView.m; sourceTree = "<group>"; };
233757512B0CB577001D0B7F /* Api+Message.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Message.m"; sourceTree = "<group>"; }; 233757512B0CB577001D0B7F /* Api+Message.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Message.m"; sourceTree = "<group>"; };
233757522B0CB577001D0B7F /* Api+Message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Message.h"; sourceTree = "<group>"; }; 233757522B0CB577001D0B7F /* Api+Message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Message.h"; sourceTree = "<group>"; };
233757542B0CB577001D0B7F /* NIMMessageUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMMessageUtils.m; sourceTree = "<group>"; }; 233757542B0CB577001D0B7F /* NIMMessageUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMMessageUtils.m; sourceTree = "<group>"; };
@@ -408,7 +405,7 @@
8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+Room.m"; sourceTree = "<group>"; }; 8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+Room.m"; sourceTree = "<group>"; };
8C9C82FB2B0C697A00A601BC /* YMRoomSendTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomSendTextView.m; sourceTree = "<group>"; }; 8C9C82FB2B0C697A00A601BC /* YMRoomSendTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomSendTextView.m; sourceTree = "<group>"; };
8C9C82FC2B0C697A00A601BC /* YMRoomSendTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomSendTextView.h; sourceTree = "<group>"; }; 8C9C82FC2B0C697A00A601BC /* YMRoomSendTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomSendTextView.h; sourceTree = "<group>"; };
8C9C82FE2B0C697A00A601BC /* StageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StageView.m; sourceTree = "<group>"; }; 8C9C82FE2B0C697A00A601BC /* CHStageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHStageView.m; sourceTree = "<group>"; };
8C9C83002B0C697A00A601BC /* MicroView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroView.h; sourceTree = "<group>"; }; 8C9C83002B0C697A00A601BC /* MicroView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroView.h; sourceTree = "<group>"; };
8C9C83012B0C697A00A601BC /* MicroViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroViewProtocol.h; sourceTree = "<group>"; }; 8C9C83012B0C697A00A601BC /* MicroViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroViewProtocol.h; sourceTree = "<group>"; };
8C9C83022B0C697A00A601BC /* MicroView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicroView.m; sourceTree = "<group>"; }; 8C9C83022B0C697A00A601BC /* MicroView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicroView.m; sourceTree = "<group>"; };
@@ -418,9 +415,8 @@
8C9C83072B0C697A00A601BC /* MicroStateModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicroStateModel.m; sourceTree = "<group>"; }; 8C9C83072B0C697A00A601BC /* MicroStateModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicroStateModel.m; sourceTree = "<group>"; };
8C9C83082B0C697A00A601BC /* MicroExtModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroExtModel.h; sourceTree = "<group>"; }; 8C9C83082B0C697A00A601BC /* MicroExtModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroExtModel.h; sourceTree = "<group>"; };
8C9C83092B0C697A00A601BC /* MicroQueueModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroQueueModel.h; sourceTree = "<group>"; }; 8C9C83092B0C697A00A601BC /* MicroQueueModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroQueueModel.h; sourceTree = "<group>"; };
8C9C830A2B0C697A00A601BC /* StageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StageView.h; sourceTree = "<group>"; }; 8C9C830A2B0C697A00A601BC /* CHStageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHStageView.h; sourceTree = "<group>"; };
8C9C830B2B0C697A00A601BC /* RoomGuestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomGuestDelegate.h; sourceTree = "<group>"; }; 8C9C830B2B0C697A00A601BC /* CHRoomGuestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHRoomGuestDelegate.h; sourceTree = "<group>"; };
8C9C830C2B0C697A00A601BC /* YMRoomMiniManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMiniManager.h; sourceTree = "<group>"; };
8C9C830E2B0C697A00A601BC /* YMRoomMessageContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMessageContainerView.m; sourceTree = "<group>"; }; 8C9C830E2B0C697A00A601BC /* YMRoomMessageContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMessageContainerView.m; sourceTree = "<group>"; };
8C9C830F2B0C697A00A601BC /* YMRoomMessageContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageContainerView.h; sourceTree = "<group>"; }; 8C9C830F2B0C697A00A601BC /* YMRoomMessageContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageContainerView.h; sourceTree = "<group>"; };
8C9C83112B0C697A00A601BC /* YMMessageInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMMessageInfoModel.m; sourceTree = "<group>"; }; 8C9C83112B0C697A00A601BC /* YMMessageInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMMessageInfoModel.m; sourceTree = "<group>"; };
@@ -432,9 +428,7 @@
8C9C83192B0C697A00A601BC /* YMRoomMessageParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageParser.h; sourceTree = "<group>"; }; 8C9C83192B0C697A00A601BC /* YMRoomMessageParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageParser.h; sourceTree = "<group>"; };
8C9C831A2B0C697A00A601BC /* YMRoomMessageParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMessageParser.m; sourceTree = "<group>"; }; 8C9C831A2B0C697A00A601BC /* YMRoomMessageParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMessageParser.m; sourceTree = "<group>"; };
8C9C831B2B0C697A00A601BC /* YMRoomMessageConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageConstant.h; sourceTree = "<group>"; }; 8C9C831B2B0C697A00A601BC /* YMRoomMessageConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageConstant.h; sourceTree = "<group>"; };
8C9C831C2B0C697A00A601BC /* RoomHostDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomHostDelegate.h; sourceTree = "<group>"; };
8C9C831D2B0C697A00A601BC /* ThemeColor+Room.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+Room.h"; sourceTree = "<group>"; }; 8C9C831D2B0C697A00A601BC /* ThemeColor+Room.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+Room.h"; sourceTree = "<group>"; };
8C9C831E2B0C697A00A601BC /* YMRoomMiniManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMiniManager.m; sourceTree = "<group>"; };
8C9C83202B0C697A00A601BC /* Api+Room.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Room.h"; sourceTree = "<group>"; }; 8C9C83202B0C697A00A601BC /* Api+Room.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Room.h"; sourceTree = "<group>"; };
8C9C83212B0C697A00A601BC /* Api+Room.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Room.m"; sourceTree = "<group>"; }; 8C9C83212B0C697A00A601BC /* Api+Room.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Room.m"; sourceTree = "<group>"; };
8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewSessionListTableViewCell.m; sourceTree = "<group>"; }; 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewSessionListTableViewCell.m; sourceTree = "<group>"; };
@@ -602,15 +596,9 @@
8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMRoomGiftAnimationParser.m; sourceTree = "<group>"; }; 8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMRoomGiftAnimationParser.m; sourceTree = "<group>"; };
8C9C849C2B0D6A5C00A601BC /* YMGiftStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YMGiftStorage.h; sourceTree = "<group>"; }; 8C9C849C2B0D6A5C00A601BC /* YMGiftStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YMGiftStorage.h; sourceTree = "<group>"; };
8C9C849D2B0D6A5C00A601BC /* YMGiftStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMGiftStorage.m; sourceTree = "<group>"; }; 8C9C849D2B0D6A5C00A601BC /* YMGiftStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMGiftStorage.m; sourceTree = "<group>"; };
8C9C849F2B0D6BCF00A601BC /* RoomAnimationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomAnimationProtocol.h; sourceTree = "<group>"; }; 8C9C849F2B0D6BCF00A601BC /* CHRoomAnimationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomAnimationProtocol.h; sourceTree = "<group>"; };
8C9C84A12B0D894100A601BC /* RoomFaceSendInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomFaceSendInfoModel.h; sourceTree = "<group>"; }; 8C9C84AB2B0D9AB900A601BC /* CHRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomMessageHeaderView.h; sourceTree = "<group>"; };
8C9C84A22B0D894100A601BC /* RoomFaceSendInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomFaceSendInfoModel.m; sourceTree = "<group>"; }; 8C9C84AC2B0D9AB900A601BC /* CHRoomMessageHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHRoomMessageHeaderView.m; sourceTree = "<group>"; };
8C9C84A52B0D920700A601BC /* MicroWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroWaveView.h; sourceTree = "<group>"; };
8C9C84A62B0D920700A601BC /* MicroWaveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroWaveView.m; sourceTree = "<group>"; };
8C9C84A82B0D930B00A601BC /* MicroNobleWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroNobleWaveView.h; sourceTree = "<group>"; };
8C9C84A92B0D930B00A601BC /* MicroNobleWaveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroNobleWaveView.m; sourceTree = "<group>"; };
8C9C84AB2B0D9AB900A601BC /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = "<group>"; };
8C9C84AC2B0D9AB900A601BC /* XPRoomMessageHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageHeaderView.m; sourceTree = "<group>"; };
8C9C84AF2B0DEAE100A601BC /* YMIButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YMIButton.h; sourceTree = "<group>"; }; 8C9C84AF2B0DEAE100A601BC /* YMIButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YMIButton.h; sourceTree = "<group>"; };
8C9C84B02B0DEAE100A601BC /* YMIButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMIButton.m; sourceTree = "<group>"; }; 8C9C84B02B0DEAE100A601BC /* YMIButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMIButton.m; sourceTree = "<group>"; };
8C9C84B22B0E94FA00A601BC /* yinmeng-ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "yinmeng-ios.entitlements"; sourceTree = "<group>"; }; 8C9C84B22B0E94FA00A601BC /* yinmeng-ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "yinmeng-ios.entitlements"; sourceTree = "<group>"; };
@@ -618,6 +606,9 @@
8C9C84B82B0ECD2100A601BC /* MineRechargePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineRechargePresenter.h; sourceTree = "<group>"; }; 8C9C84B82B0ECD2100A601BC /* MineRechargePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineRechargePresenter.h; sourceTree = "<group>"; };
8C9C84B92B0ECD2100A601BC /* MineRechargePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MineRechargePresenter.m; sourceTree = "<group>"; }; 8C9C84B92B0ECD2100A601BC /* MineRechargePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MineRechargePresenter.m; sourceTree = "<group>"; };
8C9C84BE2B0ED1D000A601BC /* MineRechargeProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineRechargeProtocol.h; sourceTree = "<group>"; }; 8C9C84BE2B0ED1D000A601BC /* MineRechargeProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineRechargeProtocol.h; sourceTree = "<group>"; };
8CAB96F22B1A729300ED8639 /* CHRoomHostDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomHostDelegate.h; sourceTree = "<group>"; };
8CAB96F32B1AB15200ED8639 /* CHRoomAnimationGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomAnimationGroup.h; sourceTree = "<group>"; };
8CAB96F42B1AB15200ED8639 /* CHRoomAnimationGroup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHRoomAnimationGroup.m; sourceTree = "<group>"; };
A22C3BCB2715A2E8FDECEA30 /* Pods-yinmeng-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.release.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.release.xcconfig"; sourceTree = "<group>"; }; A22C3BCB2715A2E8FDECEA30 /* Pods-yinmeng-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.release.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.release.xcconfig"; sourceTree = "<group>"; };
E9E8A33E3FDD457C53D1E6D7 /* Pods-yinmeng-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.debug.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.debug.xcconfig"; sourceTree = "<group>"; }; E9E8A33E3FDD457C53D1E6D7 /* Pods-yinmeng-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.debug.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@@ -672,8 +663,8 @@
233757252B0CB577001D0B7F /* Presenter */ = { 233757252B0CB577001D0B7F /* Presenter */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
233757262B0CB577001D0B7F /* MessagePresenter.m */, 233757262B0CB577001D0B7F /* CHMessagePresenter.m */,
233757272B0CB577001D0B7F /* MessagePresenter.h */, 233757272B0CB577001D0B7F /* CHMessagePresenter.h */,
); );
path = Presenter; path = Presenter;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -681,7 +672,7 @@
233757282B0CB577001D0B7F /* Protocol */ = { 233757282B0CB577001D0B7F /* Protocol */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
233757292B0CB577001D0B7F /* MessageProtocol.h */, 233757292B0CB577001D0B7F /* CHMessageProtocol.h */,
); );
path = Protocol; path = Protocol;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -722,25 +713,25 @@
233757372B0CB577001D0B7F /* Session */ = { 233757372B0CB577001D0B7F /* Session */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
23270C2A2B0E041300B9303B /* MessageAudioCenter.h */, 23270C2A2B0E041300B9303B /* CHMessageAudioCenter.h */,
23270C2B2B0E041300B9303B /* MessageAudioCenter.m */, 23270C2B2B0E041300B9303B /* CHMessageAudioCenter.m */,
23270C282B0E037300B9303B /* MessageConentAudioView.h */, 23270C282B0E037300B9303B /* CHMessageConentAudioView.h */,
23270C272B0E037300B9303B /* MessageConentAudioView.m */, 23270C272B0E037300B9303B /* CHMessageConentAudioView.m */,
233757382B0CB577001D0B7F /* SessionNavView.h */, 233757382B0CB577001D0B7F /* CHSessionNavView.h */,
233757392B0CB577001D0B7F /* SessionMessageCell.m */, 233757492B0CB577001D0B7F /* CHSessionNavView.m */,
2337573A2B0CB577001D0B7F /* SessionAudioRecordView.h */, 2337574A2B0CB577001D0B7F /* CHSessionMessageCell.h */,
2337573B2B0CB577001D0B7F /* SessionToolbarView.m */, 233757392B0CB577001D0B7F /* CHSessionMessageCell.m */,
2337573A2B0CB577001D0B7F /* CHSessionAudioRecordView.h */,
2337574F2B0CB577001D0B7F /* CHSessionAudioRecordView.m */,
2337574E2B0CB577001D0B7F /* CHSessionToolbarView.h */,
2337573B2B0CB577001D0B7F /* CHSessionToolbarView.m */,
2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */,
2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */, 2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */,
2337573D2B0CB577001D0B7F /* SessionInfoViewController.m */, 2337574C2B0CB577001D0B7F /* CHSessionInfoViewController.h */,
2337573D2B0CB577001D0B7F /* CHSessionInfoViewController.m */,
2337574B2B0CB577001D0B7F /* SessionViewController.h */,
2337573E2B0CB577001D0B7F /* SessionViewController.m */, 2337573E2B0CB577001D0B7F /* SessionViewController.m */,
2337573F2B0CB577001D0B7F /* Content */, 2337573F2B0CB577001D0B7F /* Content */,
233757492B0CB577001D0B7F /* SessionNavView.m */,
2337574A2B0CB577001D0B7F /* SessionMessageCell.h */,
2337574B2B0CB577001D0B7F /* SessionViewController.h */,
2337574C2B0CB577001D0B7F /* SessionInfoViewController.h */,
2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */,
2337574E2B0CB577001D0B7F /* SessionToolbarView.h */,
2337574F2B0CB577001D0B7F /* SessionAudioRecordView.m */,
); );
path = Session; path = Session;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -748,15 +739,15 @@
2337573F2B0CB577001D0B7F /* Content */ = { 2337573F2B0CB577001D0B7F /* Content */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
233757402B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m */, 233757442B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.h */,
233757412B0CB577001D0B7F /* MessageContentImage.m */, 233757402B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m */,
233757422B0CB577001D0B7F /* MessageContentText.h */, 233757462B0CB577001D0B7F /* CHMessageContentImage.h */,
233757432B0CB577001D0B7F /* MessageContentUnSupportView.h */, 233757412B0CB577001D0B7F /* CHMessageContentImage.m */,
233757442B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.h */, 233757422B0CB577001D0B7F /* CHMessageContentText.h */,
233757452B0CB577001D0B7F /* MessageContentProtocol.h */, 233757482B0CB577001D0B7F /* CHMessageContentText.m */,
233757462B0CB577001D0B7F /* MessageContentImage.h */, 233757432B0CB577001D0B7F /* CHMessageContentUnSupportView.h */,
233757472B0CB577001D0B7F /* MessageContentUnSupportView.m */, 233757472B0CB577001D0B7F /* CHMessageContentUnSupportView.m */,
233757482B0CB577001D0B7F /* MessageContentText.m */, 233757452B0CB577001D0B7F /* CHMessageContentProtocol.h */,
); );
path = Content; path = Content;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -1355,13 +1346,11 @@
8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */, 8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */,
8C9C82FA2B0C697A00A601BC /* MenuContainerView */, 8C9C82FA2B0C697A00A601BC /* MenuContainerView */,
8C9C82FD2B0C697A00A601BC /* StageView */, 8C9C82FD2B0C697A00A601BC /* StageView */,
8C9C830B2B0C697A00A601BC /* RoomGuestDelegate.h */, 8C9C830B2B0C697A00A601BC /* CHRoomGuestDelegate.h */,
8C9C830C2B0C697A00A601BC /* YMRoomMiniManager.h */,
8C9C830D2B0C697A00A601BC /* MessageContainerView */, 8C9C830D2B0C697A00A601BC /* MessageContainerView */,
8C9C831C2B0C697A00A601BC /* RoomHostDelegate.h */,
8C9C831D2B0C697A00A601BC /* ThemeColor+Room.h */, 8C9C831D2B0C697A00A601BC /* ThemeColor+Room.h */,
8C9C831E2B0C697A00A601BC /* YMRoomMiniManager.m */, 8C9C849F2B0D6BCF00A601BC /* CHRoomAnimationProtocol.h */,
8C9C849F2B0D6BCF00A601BC /* RoomAnimationProtocol.h */, 8CAB96F22B1A729300ED8639 /* CHRoomHostDelegate.h */,
); );
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -1378,10 +1367,10 @@
8C9C82FD2B0C697A00A601BC /* StageView */ = { 8C9C82FD2B0C697A00A601BC /* StageView */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8C9C82FE2B0C697A00A601BC /* StageView.m */,
8C9C82FF2B0C697A00A601BC /* MicroView */, 8C9C82FF2B0C697A00A601BC /* MicroView */,
8C9C83032B0C697A00A601BC /* Model */, 8C9C83032B0C697A00A601BC /* Model */,
8C9C830A2B0C697A00A601BC /* StageView.h */, 8C9C830A2B0C697A00A601BC /* CHStageView.h */,
8C9C82FE2B0C697A00A601BC /* CHStageView.m */,
); );
path = StageView; path = StageView;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -1389,7 +1378,6 @@
8C9C82FF2B0C697A00A601BC /* MicroView */ = { 8C9C82FF2B0C697A00A601BC /* MicroView */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8C9C84A42B0D91F400A601BC /* Dating */,
8C9C83002B0C697A00A601BC /* MicroView.h */, 8C9C83002B0C697A00A601BC /* MicroView.h */,
8C9C83012B0C697A00A601BC /* MicroViewProtocol.h */, 8C9C83012B0C697A00A601BC /* MicroViewProtocol.h */,
8C9C83022B0C697A00A601BC /* MicroView.m */, 8C9C83022B0C697A00A601BC /* MicroView.m */,
@@ -1418,8 +1406,8 @@
8C9C83102B0C697A00A601BC /* Model */, 8C9C83102B0C697A00A601BC /* Model */,
8C9C83152B0C697A00A601BC /* View */, 8C9C83152B0C697A00A601BC /* View */,
8C9C83182B0C697A00A601BC /* Tool */, 8C9C83182B0C697A00A601BC /* Tool */,
8C9C84AB2B0D9AB900A601BC /* XPRoomMessageHeaderView.h */, 8C9C84AB2B0D9AB900A601BC /* CHRoomMessageHeaderView.h */,
8C9C84AC2B0D9AB900A601BC /* XPRoomMessageHeaderView.m */, 8C9C84AC2B0D9AB900A601BC /* CHRoomMessageHeaderView.m */,
); );
path = MessageContainerView; path = MessageContainerView;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -2114,7 +2102,6 @@
8C9C84802B0D25C700A601BC /* ModuleKit */ = { 8C9C84802B0D25C700A601BC /* ModuleKit */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
8C9C84A02B0D892C00A601BC /* FaceView */,
8C9C84812B0D25D700A601BC /* SendGiftView */, 8C9C84812B0D25D700A601BC /* SendGiftView */,
); );
path = ModuleKit; path = ModuleKit;
@@ -2167,6 +2154,8 @@
8C9C84962B0D65E200A601BC /* YMRoomAnimationView.m */, 8C9C84962B0D65E200A601BC /* YMRoomAnimationView.m */,
8C9C84982B0D675600A601BC /* YMRoomGiftAnimationParser.h */, 8C9C84982B0D675600A601BC /* YMRoomGiftAnimationParser.h */,
8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */, 8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */,
8CAB96F32B1AB15200ED8639 /* CHRoomAnimationGroup.h */,
8CAB96F42B1AB15200ED8639 /* CHRoomAnimationGroup.m */,
); );
path = AnimationView; path = AnimationView;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -2180,26 +2169,6 @@
path = Presenter; path = Presenter;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
8C9C84A02B0D892C00A601BC /* FaceView */ = {
isa = PBXGroup;
children = (
8C9C84A12B0D894100A601BC /* RoomFaceSendInfoModel.h */,
8C9C84A22B0D894100A601BC /* RoomFaceSendInfoModel.m */,
);
path = FaceView;
sourceTree = "<group>";
};
8C9C84A42B0D91F400A601BC /* Dating */ = {
isa = PBXGroup;
children = (
8C9C84A52B0D920700A601BC /* MicroWaveView.h */,
8C9C84A62B0D920700A601BC /* MicroWaveView.m */,
8C9C84A82B0D930B00A601BC /* MicroNobleWaveView.h */,
8C9C84A92B0D930B00A601BC /* MicroNobleWaveView.m */,
);
path = Dating;
sourceTree = "<group>";
};
8C9C84AE2B0DEA9600A601BC /* Button */ = { 8C9C84AE2B0DEA9600A601BC /* Button */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -2359,16 +2328,15 @@
8C9C843B2B0C697A00A601BC /* TRTCRtcImpl.m in Sources */, 8C9C843B2B0C697A00A601BC /* TRTCRtcImpl.m in Sources */,
8C9C82C32B0C695600A601BC /* YYUtility.m in Sources */, 8C9C82C32B0C695600A601BC /* YYUtility.m in Sources */,
8C9C82C92B0C695600A601BC /* UploadFile.m in Sources */, 8C9C82C92B0C695600A601BC /* UploadFile.m in Sources */,
2337575C2B0CB577001D0B7F /* SessionMessageCell.m in Sources */, 2337575C2B0CB577001D0B7F /* CHSessionMessageCell.m in Sources */,
8C9C821F2B0C694900A601BC /* AppDelegate.m in Sources */, 8C9C821F2B0C694900A601BC /* AppDelegate.m in Sources */,
8C92A8182B0EF3E9008F362C /* MineModifPayPwdView.m in Sources */, 8C92A8182B0EF3E9008F362C /* MineModifPayPwdView.m in Sources */,
8C9C84462B0C697A00A601BC /* YMMineSettingViewController.m in Sources */, 8C9C84462B0C697A00A601BC /* YMMineSettingViewController.m in Sources */,
8C9C843D2B0C697A00A601BC /* YMMineCollectRoomPresenter.m in Sources */, 8C9C843D2B0C697A00A601BC /* YMMineCollectRoomPresenter.m in Sources */,
8C9C82A92B0C695600A601BC /* BaseNavigationController.m in Sources */, 8C9C82A92B0C695600A601BC /* BaseNavigationController.m in Sources */,
8C9C84A72B0D920700A601BC /* MicroWaveView.m in Sources */,
8C9C82BC2B0C695600A601BC /* UserInfoModel.m in Sources */, 8C9C82BC2B0C695600A601BC /* UserInfoModel.m in Sources */,
8C9C84602B0C697A00A601BC /* MewVoiceGuideView.m in Sources */, 8C9C84602B0C697A00A601BC /* MewVoiceGuideView.m in Sources */,
23270C292B0E037300B9303B /* MessageConentAudioView.m in Sources */, 23270C292B0E037300B9303B /* CHMessageConentAudioView.m in Sources */,
8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */, 8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */,
8C9C82AB2B0C695600A601BC /* NetImageConfig.m in Sources */, 8C9C82AB2B0C695600A601BC /* NetImageConfig.m in Sources */,
8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */, 8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */,
@@ -2376,6 +2344,7 @@
8C9C843A2B0C697A00A601BC /* BaseRtcImpl.m in Sources */, 8C9C843A2B0C697A00A601BC /* BaseRtcImpl.m in Sources */,
8C9C84672B0C697A00A601BC /* MewHeaderView.m in Sources */, 8C9C84672B0C697A00A601BC /* MewHeaderView.m in Sources */,
8C9C84662B0C697A00A601BC /* MewUserIntroductionView.m in Sources */, 8C9C84662B0C697A00A601BC /* MewUserIntroductionView.m in Sources */,
8CAB96F52B1AB15200ED8639 /* CHRoomAnimationGroup.m in Sources */,
8C9C82C42B0C695600A601BC /* YYUtility+Carrier.m in Sources */, 8C9C82C42B0C695600A601BC /* YYUtility+Carrier.m in Sources */,
8C9C84172B0C697A00A601BC /* YMWebViewController.m in Sources */, 8C9C84172B0C697A00A601BC /* YMWebViewController.m in Sources */,
8C92A8232B0FE1DC008F362C /* MewHtmlUrl.m in Sources */, 8C92A8232B0FE1DC008F362C /* MewHtmlUrl.m in Sources */,
@@ -2387,10 +2356,10 @@
8C9C84592B0C697A00A601BC /* TabbarViewController.m in Sources */, 8C9C84592B0C697A00A601BC /* TabbarViewController.m in Sources */,
8C9C82BE2B0C695600A601BC /* LoginTicketInfo.m in Sources */, 8C9C82BE2B0C695600A601BC /* LoginTicketInfo.m in Sources */,
8C9C84542B0C697A00A601BC /* LoginInputView.m in Sources */, 8C9C84542B0C697A00A601BC /* LoginInputView.m in Sources */,
233757632B0CB577001D0B7F /* MessageContentUnSupportView.m in Sources */, 233757632B0CB577001D0B7F /* CHMessageContentUnSupportView.m in Sources */,
2337575E2B0CB577001D0B7F /* NIMMessageMaker.m in Sources */, 2337575E2B0CB577001D0B7F /* NIMMessageMaker.m in Sources */,
8C9C82B92B0C695600A601BC /* NSObject+AutoCoding.m in Sources */, 8C9C82B92B0C695600A601BC /* NSObject+AutoCoding.m in Sources */,
233757622B0CB577001D0B7F /* MessageContentImage.m in Sources */, 233757622B0CB577001D0B7F /* CHMessageContentImage.m in Sources */,
8C9C84772B0C697A00A601BC /* MewLoginPhoneView.m in Sources */, 8C9C84772B0C697A00A601BC /* MewLoginPhoneView.m in Sources */,
8C9C84692B0C697A00A601BC /* YMHomeFilterView.m in Sources */, 8C9C84692B0C697A00A601BC /* YMHomeFilterView.m in Sources */,
8C9C84532B0C697A00A601BC /* LoginForgetPasswordViewController.m in Sources */, 8C9C84532B0C697A00A601BC /* LoginForgetPasswordViewController.m in Sources */,
@@ -2403,7 +2372,7 @@
8C9C843F2B0C697A00A601BC /* FansInfoModel.m in Sources */, 8C9C843F2B0C697A00A601BC /* FansInfoModel.m in Sources */,
8C9C84712B0C697A00A601BC /* MewPartyModel.m in Sources */, 8C9C84712B0C697A00A601BC /* MewPartyModel.m in Sources */,
8C9C82BF2B0C695600A601BC /* AccountModel.m in Sources */, 8C9C82BF2B0C695600A601BC /* AccountModel.m in Sources */,
233757652B0CB577001D0B7F /* SessionNavView.m in Sources */, 233757652B0CB577001D0B7F /* CHSessionNavView.m in Sources */,
8C9C84722B0C697A00A601BC /* MewPartyListCollectionViewCell.m in Sources */, 8C9C84722B0C697A00A601BC /* MewPartyListCollectionViewCell.m in Sources */,
8C9C846F2B0C697A00A601BC /* MewRoomMessageTableCell.m in Sources */, 8C9C846F2B0C697A00A601BC /* MewRoomMessageTableCell.m in Sources */,
8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */, 8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */,
@@ -2412,12 +2381,12 @@
233757592B0CB577001D0B7F /* NIMBadgeView.m in Sources */, 233757592B0CB577001D0B7F /* NIMBadgeView.m in Sources */,
8C9C846D2B0C697A00A601BC /* MewRoomRightView.m in Sources */, 8C9C846D2B0C697A00A601BC /* MewRoomRightView.m in Sources */,
8C9C84582B0C697A00A601BC /* MainPresenter.m in Sources */, 8C9C84582B0C697A00A601BC /* MainPresenter.m in Sources */,
233757562B0CB577001D0B7F /* MessagePresenter.m in Sources */, 233757562B0CB577001D0B7F /* CHMessagePresenter.m in Sources */,
8C9C84512B0C697A00A601BC /* LoginPasswordPresent.m in Sources */, 8C9C84512B0C697A00A601BC /* LoginPasswordPresent.m in Sources */,
8C9C841F2B0C697A00A601BC /* StageView.m in Sources */, 8C9C841F2B0C697A00A601BC /* CHStageView.m in Sources */,
8C9C844D2B0C697A00A601BC /* LoginForgetPasswordPresent.m in Sources */, 8C9C844D2B0C697A00A601BC /* LoginForgetPasswordPresent.m in Sources */,
8C9C82C12B0C695600A601BC /* Api.m in Sources */, 8C9C82C12B0C695600A601BC /* Api.m in Sources */,
23270C2C2B0E041300B9303B /* MessageAudioCenter.m in Sources */, 23270C2C2B0E041300B9303B /* CHMessageAudioCenter.m in Sources */,
8C9C844A2B0C697A00A601BC /* Api+Mine.m in Sources */, 8C9C844A2B0C697A00A601BC /* Api+Mine.m in Sources */,
8C9C82A82B0C695600A601BC /* BaseViewController.m in Sources */, 8C9C82A82B0C695600A601BC /* BaseViewController.m in Sources */,
8C9C82C72B0C695600A601BC /* NSMutableDictionary+Safe.m in Sources */, 8C9C82C72B0C695600A601BC /* NSMutableDictionary+Safe.m in Sources */,
@@ -2425,7 +2394,7 @@
8C9C84782B0C697A00A601BC /* MewLoginPasswordView.m in Sources */, 8C9C84782B0C697A00A601BC /* MewLoginPasswordView.m in Sources */,
8C9C84622B0C697A00A601BC /* MewVoiceDiscView.m in Sources */, 8C9C84622B0C697A00A601BC /* MewVoiceDiscView.m in Sources */,
8C9C82AE2B0C695600A601BC /* TTPopup.m in Sources */, 8C9C82AE2B0C695600A601BC /* TTPopup.m in Sources */,
8C9C84AD2B0D9AB900A601BC /* XPRoomMessageHeaderView.m in Sources */, 8C9C84AD2B0D9AB900A601BC /* CHRoomMessageHeaderView.m in Sources */,
8C9C84442B0C697A00A601BC /* YMMineCollectRoomCell.m in Sources */, 8C9C84442B0C697A00A601BC /* YMMineCollectRoomCell.m in Sources */,
8C9C82B52B0C695600A601BC /* TTActionSheetView.m in Sources */, 8C9C82B52B0C695600A601BC /* TTActionSheetView.m in Sources */,
8C9C82B32B0C695600A601BC /* TTPopupManagerService.m in Sources */, 8C9C82B32B0C695600A601BC /* TTPopupManagerService.m in Sources */,
@@ -2443,7 +2412,6 @@
23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */, 23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */,
8C9C844F2B0C697A00A601BC /* LoginFullInfoPresenter.m in Sources */, 8C9C844F2B0C697A00A601BC /* LoginFullInfoPresenter.m in Sources */,
8C9C82D22B0C695600A601BC /* YMIAPHelper.m in Sources */, 8C9C82D22B0C695600A601BC /* YMIAPHelper.m in Sources */,
8C9C84A32B0D894100A601BC /* RoomFaceSendInfoModel.m in Sources */,
8C9C84222B0C697A00A601BC /* MicroExtModel.m in Sources */, 8C9C84222B0C697A00A601BC /* MicroExtModel.m in Sources */,
8C9C843C2B0C697A00A601BC /* RtcManager.m in Sources */, 8C9C843C2B0C697A00A601BC /* RtcManager.m in Sources */,
8C9C84BA2B0ECD2100A601BC /* MineRechargePresenter.m in Sources */, 8C9C84BA2B0ECD2100A601BC /* MineRechargePresenter.m in Sources */,
@@ -2453,7 +2421,7 @@
8C9C84732B0C697A00A601BC /* MewPartyViewController.m in Sources */, 8C9C84732B0C697A00A601BC /* MewPartyViewController.m in Sources */,
8C9C82D32B0C695600A601BC /* YYReachability.m in Sources */, 8C9C82D32B0C695600A601BC /* YYReachability.m in Sources */,
8C4D53622AFD4CF700238AE6 /* main.m in Sources */, 8C4D53622AFD4CF700238AE6 /* main.m in Sources */,
233757642B0CB577001D0B7F /* MessageContentText.m in Sources */, 233757642B0CB577001D0B7F /* CHMessageContentText.m in Sources */,
8C9C84242B0C697A00A601BC /* YMRoomMessageContainerView.m in Sources */, 8C9C84242B0C697A00A601BC /* YMRoomMessageContainerView.m in Sources */,
8C9C84612B0C697A00A601BC /* MewPushExclusiveVoiceView.m in Sources */, 8C9C84612B0C697A00A601BC /* MewPushExclusiveVoiceView.m in Sources */,
8C9C845D2B0C697A00A601BC /* MewHomePresenter.m in Sources */, 8C9C845D2B0C697A00A601BC /* MewHomePresenter.m in Sources */,
@@ -2475,16 +2443,14 @@
8C9C845E2B0C697A00A601BC /* AudioPlayerManager.m in Sources */, 8C9C845E2B0C697A00A601BC /* AudioPlayerManager.m in Sources */,
8C9C848C2B0D2B8500A601BC /* GiftReceiveInfoModel.m in Sources */, 8C9C848C2B0D2B8500A601BC /* GiftReceiveInfoModel.m in Sources */,
8C9C84572B0C697A00A601BC /* Api+Login.m in Sources */, 8C9C84572B0C697A00A601BC /* Api+Login.m in Sources */,
2337575D2B0CB577001D0B7F /* SessionToolbarView.m in Sources */, 2337575D2B0CB577001D0B7F /* CHSessionToolbarView.m in Sources */,
8C9C82CB2B0C695600A601BC /* TimeIntervalUtils.m in Sources */, 8C9C82CB2B0C695600A601BC /* TimeIntervalUtils.m in Sources */,
8C9C84192B0C697A00A601BC /* HomeRecommendRoomModel.m in Sources */, 8C9C84192B0C697A00A601BC /* HomeRecommendRoomModel.m in Sources */,
233757612B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m in Sources */, 233757612B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m in Sources */,
8C9C82B62B0C695600A601BC /* TTPopupService.m in Sources */, 8C9C82B62B0C695600A601BC /* TTPopupService.m in Sources */,
233757662B0CB577001D0B7F /* SessionAudioRecordView.m in Sources */, 233757662B0CB577001D0B7F /* CHSessionAudioRecordView.m in Sources */,
233757672B0CB577001D0B7F /* Api+Message.m in Sources */, 233757672B0CB577001D0B7F /* Api+Message.m in Sources */,
8C9C841A2B0C697A00A601BC /* Api+Home.m in Sources */, 8C9C841A2B0C697A00A601BC /* Api+Home.m in Sources */,
8C9C84AA2B0D930B00A601BC /* MicroNobleWaveView.m in Sources */,
8C9C84292B0C697A00A601BC /* YMRoomMiniManager.m in Sources */,
8C9C82AD2B0C695600A601BC /* YMEmptyTableViewCell.m in Sources */, 8C9C82AD2B0C695600A601BC /* YMEmptyTableViewCell.m in Sources */,
8C9C845F2B0C697A00A601BC /* MewHomeViewController.m in Sources */, 8C9C845F2B0C697A00A601BC /* MewHomeViewController.m in Sources */,
8C9C84422B0C697A00A601BC /* RechargeListModel.m in Sources */, 8C9C84422B0C697A00A601BC /* RechargeListModel.m in Sources */,
@@ -2525,7 +2491,7 @@
8C9C84452B0C697A00A601BC /* YMMineCollectRoomViewController.m in Sources */, 8C9C84452B0C697A00A601BC /* YMMineCollectRoomViewController.m in Sources */,
8C9C82AC2B0C695600A601BC /* NetImageView.m in Sources */, 8C9C82AC2B0C695600A601BC /* NetImageView.m in Sources */,
8C9C82C52B0C695600A601BC /* YYUtility+App.m in Sources */, 8C9C82C52B0C695600A601BC /* YYUtility+App.m in Sources */,
2337575F2B0CB577001D0B7F /* SessionInfoViewController.m in Sources */, 2337575F2B0CB577001D0B7F /* CHSessionInfoViewController.m in Sources */,
8C9C82CE2B0C695600A601BC /* YMWeakTimer.m in Sources */, 8C9C82CE2B0C695600A601BC /* YMWeakTimer.m in Sources */,
8C9C846B2B0C697A00A601BC /* MewSocialMicroView.m in Sources */, 8C9C846B2B0C697A00A601BC /* MewSocialMicroView.m in Sources */,
233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */, 233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */,

View File

@@ -31,7 +31,7 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Release" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"

View File

@@ -48,9 +48,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 用户签名 /// 用户签名
@property (nonatomic, copy) NSString *userDesc; @property (nonatomic, copy) NSString *userDesc;
///跟随的 本地添加的字段 ///跟随的 本地添加的字段
@property (nonatomic,copy) NSString *fromNick; //@property (nonatomic,copy) NSString *fromNick;
@property (nonatomic,assign) UserEnterRoomFromType fromType; //@property (nonatomic,assign) UserEnterRoomFromType fromType;
@property (nonatomic,copy) NSString *fromUid; //@property (nonatomic,copy) NSString *fromUid;
#pragma mark - 相亲房的字段 #pragma mark - 相亲房的字段
///贵族信息 ///贵族信息

View File

@@ -16,10 +16,10 @@
#else #else
/// http://h5.ymlive.fun /// http://h5.ymlive.fun
#define API_HOST_H5_URL @"+q1JXmshk337bVXcYPsrJRAilYbIsStE4fh5dRzDj2k=" #define API_HOST_H5_URL @"https://h5.ymlive.fun"
/// https://api.ymlive.fun /// https://api.ymlive.fun
#define API_HOST_URL @"Lk4rBT4xOjIVF9nPfBvRvyW9xx/sjOb0YbkCThRndxU=" #define API_HOST_URL @"https://api.ymlive.fun"
#endif #endif

View File

@@ -30,17 +30,5 @@ typedef NS_ENUM(NSUInteger, GetSmsType) {
GetSmsType_Unbind_Phone = 7, ///解绑手机 GetSmsType_Unbind_Phone = 7, ///解绑手机
}; };
typedef NS_ENUM(NSInteger, UserEnterRoomFromType) {
///首页推荐
UserEnterRoomFromType_Home_Recommend = 1,
///跟随用户
UserEnterRoomFromType_Follow_User = 2,
///赛事详情
UserEnterRoomFromType_Follow_Game_Detail = 8,
///跨房PK
UserEnterRoomFromType_Cross_Room_PK = 9,
///新用户打招呼
UserEnterRoomFromType_New_User_Greet = 10
};
#endif /* YMEnum_h */ #endif /* YMEnum_h */

View File

@@ -11,19 +11,22 @@
/// Tool /// Tool
#import "YMMacro.h" #import "YMMacro.h"
#import "ThemeColor.h" #import "ThemeColor.h"
#import "NSArray+Safe.h"
/// Third /// Third
#import <MJRefresh/MJRefresh.h> #import <MJRefresh/MJRefresh.h>
///P ///P
#import "YMMineCollectRoomProtocol.h" #import "YMMineCollectRoomProtocol.h"
#import "YMMineCollectRoomPresenter.h" #import "YMMineCollectRoomPresenter.h"
#import "Api+Mine.h" #import "Api+Mine.h"
/// Model
#import "MineCollectRoomModel.h"
@interface MewMineCollectionViewController () <UITableViewDelegate, UITableViewDataSource, YMMineCollectRoomProtocol> @interface MewMineCollectionViewController () <UITableViewDelegate, UITableViewDataSource, YMMineCollectRoomProtocol>
@property (nonatomic, strong) UITableView *collectionTableView; @property (nonatomic, strong) UITableView *collectionTableView;
/// ///
@property (nonatomic, strong) NSMutableArray *collectionModels; @property (nonatomic, strong) NSMutableArray<MineCollectRoomModel *> *collectionModels;
/// ///
@property (nonatomic,assign) int page; @property (nonatomic,assign) int page;
/// ///
@@ -43,6 +46,7 @@
self.view.backgroundColor = UIColor.whiteColor; self.view.backgroundColor = UIColor.whiteColor;
self.title = @"我的收藏"; self.title = @"我的收藏";
[self initView]; [self initView];
[self initHeaderAndFooterRrfresh];
} }
#pragma mark - Init #pragma mark - Init
@@ -64,7 +68,7 @@
MewMineCollectionTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MewMineCollectionTableViewCell class])]; MewMineCollectionTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MewMineCollectionTableViewCell class])];
cell.roomInfo = [self.collectionModels safeObjectAtIndex1:indexPath.row];
return cell; return cell;
} }
@@ -145,7 +149,7 @@
return _collectionTableView; return _collectionTableView;
} }
- (NSMutableArray *)collectionModels { - (NSMutableArray<MineCollectRoomModel *> *)collectionModels {
if (!_collectionModels) { if (!_collectionModels) {
_collectionModels = [NSMutableArray array]; _collectionModels = [NSMutableArray array];
} }

View File

@@ -242,7 +242,7 @@
- (UILabel *)balanceMoneyLabel { - (UILabel *)balanceMoneyLabel {
if (!_balanceMoneyLabel) { if (!_balanceMoneyLabel) {
_balanceMoneyLabel = [[UILabel alloc] init]; _balanceMoneyLabel = [[UILabel alloc] init];
_balanceMoneyLabel.text = @"1000004"; // _balanceMoneyLabel.text = @"1000004";
_balanceMoneyLabel.textColor = UIColor.whiteColor; _balanceMoneyLabel.textColor = UIColor.whiteColor;
_balanceMoneyLabel.font = kFontSemibold(34); _balanceMoneyLabel.font = kFontSemibold(34);
} }

View File

@@ -6,6 +6,7 @@
// //
#import "MewPartyViewController.h" #import "MewPartyViewController.h"
#import "MewMineCollectionViewController.h"
/// View /// View
#import "MewPartyListCollectionViewCell.h" #import "MewPartyListCollectionViewCell.h"
#import "MewRoomViewController.h" #import "MewRoomViewController.h"
@@ -70,14 +71,9 @@
#pragma mark - Load Data #pragma mark - Load Data
- (void)loadData { - (void)loadData {
[self.presenter homeRecommendRoomList]; [self.presenter homeRecommendRoomList];
// [self.presenter getRecommendRoomList:@"recommend" page:1 pageSize:20 state:0];
} }
#pragma mark - YMHomeProtocol #pragma mark - YMHomeProtocol
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state {
// self.homeRecommendModels = list;
// [self.partyCollectionView reloadData];
}
- (void)homeRecommendRoomListSuccess:(NSArray *)list { - (void)homeRecommendRoomListSuccess:(NSArray *)list {
self.homeRecommendModels = list; self.homeRecommendModels = list;
@@ -103,6 +99,10 @@
[MewRoomViewController openRoom:roomId viewController:self]; [MewRoomViewController openRoom:roomId viewController:self];
} }
- (void)gotoWithMineCollection:(UITapGestureRecognizer *)tap {
MewMineCollectionViewController *controller = [[MewMineCollectionViewController alloc] init];
[self.navigationController pushViewController:controller animated:NO];
}
#pragma mark - Init #pragma mark - Init
- (void)initView { - (void)initView {
@@ -171,6 +171,9 @@
if (!_collectBgImageView) { if (!_collectBgImageView) {
_collectBgImageView = [[UIImageView alloc] init]; _collectBgImageView = [[UIImageView alloc] init];
_collectBgImageView.image = [UIImage imageNamed:@"mew_party_collection_bg"]; _collectBgImageView.image = [UIImage imageNamed:@"mew_party_collection_bg"];
_collectBgImageView.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoWithMineCollection:)];
[_collectBgImageView addGestureRecognizer:tap];
} }
return _collectBgImageView; return _collectBgImageView;
} }

View File

@@ -24,18 +24,16 @@
#import "GiftInfoModel.h" #import "GiftInfoModel.h"
#import "GiftReceiveInfoModel.h" #import "GiftReceiveInfoModel.h"
#import "YMMessageRemoteExtModel.h" #import "YMMessageRemoteExtModel.h"
#import "RoomFaceSendInfoModel.h"
///Tool ///Tool
#import "AccountInfoStorage.h" #import "AccountInfoStorage.h"
#import "YMHUDTool.h" #import "YMHUDTool.h"
#import "YMRoomMiniManager.h"
#import "YMMacro.h" #import "YMMacro.h"
#import "NSArray+Safe.h" #import "NSArray+Safe.h"
#import "RtcManager.h" #import "RtcManager.h"
///P ///P
#import "YMRoomPresenter.h" #import "YMRoomPresenter.h"
#import "YMRoomProtocol.h" #import "YMRoomProtocol.h"
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
/// Third /// Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@@ -43,38 +41,28 @@
@interface MewRoomViewController ()<YMRoomProtocol, @interface MewRoomViewController ()<YMRoomProtocol,
NIMChatroomManagerDelegate, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMLoginManagerDelegate, NIMChatroomManagerDelegate, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMLoginManagerDelegate,
RoomHostDelegate, MewRoomRightViewDelegate, MewRoomHeaderViewDelegate> CHRoomHostDelegate, MewRoomRightViewDelegate, MewRoomHeaderViewDelegate>
// //
@property (nonatomic, strong) UIImageView *roomBgImageView; @property (nonatomic, strong) UIImageView *roomBgImageView;
@property (nonatomic, strong) MewRoomHeaderView *roomHeaderView; @property (nonatomic, strong) MewRoomHeaderView *roomHeaderView;
@property (nonatomic, strong) MewRoomRightView *roomRightView; @property (nonatomic, strong) MewRoomRightView *roomRightView;
@property (nonatomic, strong) StageView *stageView; @property (nonatomic, strong) CHStageView *roomStageView;
@property (nonatomic, strong) YMRoomMessageContainerView *messageContainerView; @property (nonatomic, strong) YMRoomMessageContainerView *roomMessageView;
///view ///view
@property (nonatomic,strong) YMRoomAnimationView *animationView; @property (nonatomic,strong) YMRoomAnimationView *roomAnimationView;
@property (nonatomic, strong) UIImageView *emojiImageView; @property (nonatomic, strong) UIImageView *emojiImageView;
///
@property (nonatomic,strong) YMRoomSendTextView *inputTextView;
/// Uid /// Uid
@property (nonatomic, strong) NSString *roomUid; @property (nonatomic, strong) NSString *roomUid;
///
@property (nonatomic, strong) NSString *fromNick;
@property (nonatomic,assign) UserEnterRoomFromType fromType;
@property (nonatomic,copy) NSString *fromUid;
/// ///
@property (nonatomic, strong) UserInfoModel *userInfo; @property (nonatomic, strong) UserInfoModel *userInfo;
/// ///
@property (nonatomic, strong) RoomInfoModel *roomInfo; @property (nonatomic, strong) RoomInfoModel *roomInfo;
/// emoji
@property (nonatomic, assign) BOOL isPlayEmojiAnimation; @property (nonatomic, assign) BOOL isPlayEmojiAnimation;
@property (nonatomic, copy) NSArray<NSString *> *emojiArrays; @property (nonatomic, copy) NSArray<NSString *> *emojiArrays;
@property (nonatomic, strong) NSMutableArray<NSString *> *playEmojiArrays; @property (nonatomic, strong) NSMutableArray<NSString *> *playEmojiArrays;
///
@property (nonatomic,assign) BOOL isMiniEnter;
@end @end
@implementation MewRoomViewController @implementation MewRoomViewController
@@ -95,13 +83,7 @@
self.emojiArrays = @[@"mew_room_emoji_deyi",@"mew_room_emoji_happy",@"mew_room_emoji_sex",@"mew_room_emoji_suprise"]; self.emojiArrays = @[@"mew_room_emoji_deyi",@"mew_room_emoji_happy",@"mew_room_emoji_sex",@"mew_room_emoji_suprise"];
self.playEmojiArrays = [NSMutableArray array]; self.playEmojiArrays = [NSMutableArray array];
self.isPlayEmojiAnimation = NO; self.isPlayEmojiAnimation = NO;
if (self.isMiniEnter) {
//
} else {
[self.presenter initEnterRoom:self.roomUid user:[AccountInfoStorage instance].getUid]; [self.presenter initEnterRoom:self.roomUid user:[AccountInfoStorage instance].getUid];
}
// //
[[NIMSDK sharedSDK].chatroomManager addDelegate:self]; [[NIMSDK sharedSDK].chatroomManager addDelegate:self];
@@ -125,23 +107,6 @@
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages { - (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
for (NIMMessage * message in messages) { for (NIMMessage * message in messages) {
///p2p ///p2p
if (message.session.sessionType == NIMSessionTypeP2P) {
if(message.messageType == NIMMessageTypeCustom) {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel * attachment = obj.attachment;
if (attachment.first == CustomMessageType_User_UpGrade) {
// ContentLevelUpgradeModel * levelInfo = [ContentLevelUpgradeModel modelWithDictionary:attachment.data];
// if (attachment.second == Custom_Message_Sub_User_UpGrade_Exper) {
// self.userInfo.userLevelVo.experLevelSeq = levelInfo.levelSeq;
// } else if(attachment.second == Custom_Message_Sub_User_UpGrade_Charm) {
// self.userInfo.userLevelVo.charmLevelSeq = levelInfo.levelSeq;
// }
}
}
}
}
// //
if (message.session.sessionType != NIMSessionTypeChatroom) { if (message.session.sessionType != NIMSessionTypeChatroom) {
continue; continue;
@@ -167,72 +132,8 @@
{ {
NSMutableDictionary *lastRoomInfoDic = [NSMutableDictionary dictionaryWithDictionary:[self.roomInfo model2dictionary]]; NSMutableDictionary *lastRoomInfoDic = [NSMutableDictionary dictionaryWithDictionary:[self.roomInfo model2dictionary]];
[lastRoomInfoDic addEntriesFromDictionary: ((NSString *)data[@"roomInfo"]).toJSONObject]; [lastRoomInfoDic addEntriesFromDictionary: ((NSString *)data[@"roomInfo"]).toJSONObject];
RoomInfoModel *newRoomInfo = [RoomInfoModel modelWithJSON:lastRoomInfoDic]; [self.roomStageView onRoomUpdate];
// //TODO: mgid // [self.roomMessageView onRoomUpdate];
// if (newRoomInfo.type != RoomType_MiniGame) {
// newRoomInfo.mgId = 0;
// }
// newRoomInfo.hasAnimationEffect = self.hasAnimationEffect;
// if (newRoomInfo.roomModeType == RoomModeType_Open_Blind && self.roomInfo.roomModeType != RoomModeType_Open_Blind) {
// ///
// newRoomInfo.datingState = RoomDatingStateChangeType_Open;
// } else if(newRoomInfo.roomModeType != RoomModeType_Open_Blind && self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
// ///
// newRoomInfo.datingState = RoomDatingStateChangeType_Close;
// } else {
// newRoomInfo.datingState = RoomDatingStateChangeType_Normal;
// }
//->->)
// newRoomInfo.hadChangeRoomType = self.roomInfo.type != newRoomInfo.type;
// BOOL anchorToOther = newRoomInfo.type != RoomType_Anchor && self.roomInfo.type == RoomType_Anchor;//
self.roomInfo = newRoomInfo;
// [self.backContainerView onRoomUpdate];
// self.quickMessageContainerView.titleArray = self.roomInfo.speakTemplate;
// if (self.roomInfo.type == RoomType_Anchor && self.roomInfo.hadChangeRoomType) {///
// [self handleInitAnchorRoom];
// [self showAnchorScrollTipView];
// } else if (anchorToOther) {
// [self.anchorScrollView removeFromSuperview];
// [self.backContainerView removeFromSuperview];
// [self.stageView removeFromSuperview];
// [self.messageContainerView removeFromSuperview];
// [self.quickMessageContainerView removeFromSuperview];
// [self.activityContainerView removeFromSuperview];
// [self.roomHeaderView removeFromSuperview];
// [self.functionView removeFromSuperview];
// [self.menuContainerView removeFromSuperview];
//
// [self.view addSubview:self.backContainerView];
// [self.view addSubview:self.stageView];
// [self.view addSubview:self.messageContainerView];
// [self.view addSubview:self.quickMessageContainerView];
// [self.view addSubview:self.activityContainerView];
// [self.view addSubview:self.roomHeaderView];
// [self.view addSubview:self.functionView];
// [self.view addSubview:self.menuContainerView];
// [self.view bringSubviewToFront:self.menuContainerView];
// [self.view bringSubviewToFront:self.animationView];
// [self initSubViewConstraints];
// [self changeStageViewOnRoomUpdate];
// [self.stageView onRoomUpdate];
// [self.menuContainerView onRoomUpdate];
// [self.functionView onRoomUpdate];
// [self.activityContainerView onRoomUpdate];
// [self.messageContainerView onRoomUpdate];
// [self.littleGameView onRoomUpdate];
// } else {
// if (self.roomInfo.type == RoomType_Anchor) {
// [self changeStageViewOnAnchorRoom];
// } else {
// [self changeStageViewOnRoomUpdate];
// }
[self.stageView onRoomUpdate];
// [self.menuContainerView onRoomUpdate];
// [self.functionView onRoomUpdate];
// [self.activityContainerView onRoomUpdate];
[self.messageContainerView onRoomUpdate];
// [self.littleGameView onRoomUpdate];
// }
} }
break; break;
} }
@@ -242,10 +143,6 @@
if (content.source.userId.integerValue != [AccountInfoStorage instance].getUid.integerValue && self.userInfo.platformRole != 1) { if (content.source.userId.integerValue != [AccountInfoStorage instance].getUid.integerValue && self.userInfo.platformRole != 1) {
// onLineNumber += 1; // onLineNumber += 1;
}else {/// }else {///
// [self userEnterRoomSuccess];
// ///
// [self.activityContainerView onRoomUpdate];
// [self.menuContainerView onRoomUpdate];
} }
break; break;
case NIMChatroomEventTypeAddBlack: case NIMChatroomEventTypeAddBlack:
@@ -268,32 +165,21 @@
} }
self.roomInfo.onlineNum = onLineNumber; self.roomInfo.onlineNum = onLineNumber;
// [self.roomHeaderView onRoomUpdate]; // [self.roomHeaderView onRoomUpdate];
[self.stageView handleNIMNotificationMessage:message]; [self.roomStageView handleNIMNotificationMessage:message];
[self.animationView handleNIMNotificationMessage:message]; [self.roomAnimationView handleNIMNotificationMessage:message];
[self.messageContainerView handleNIMNotificationMessage:message]; [self.roomMessageView handleNIMNotificationMessage:message];
} else if (message.messageType == NIMMessageTypeCustom) { } else if (message.messageType == NIMMessageTypeCustom) {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel * attachment = obj.attachment; [self.roomStageView handleNIMCustomMessage:message];
[self.stageView handleNIMCustomMessage:message]; [self.roomAnimationView handleNIMCustomMessage:message];
[self.animationView handleNIMCustomMessage:message];
if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState) {
///iOS
NSDictionary * dic= attachment.data[@"roomInfo"];
if (dic.allKeys.count <=0) {
dic = attachment.data;
}
RoomInfoModel * roomInfo = [RoomInfoModel modelWithDictionary:dic];
// self.roomInfo.isCloseScreen = roomInfo.isCloseScreen;
// [self.menuContainerView onRoomUpdate];
}
[self.messageContainerView handleNIMCustomMessage:message]; [self.roomMessageView handleNIMCustomMessage:message];
} }
} else if(message.messageType == NIMMessageTypeText) { } else if(message.messageType == NIMMessageTypeText) {
[self.messageContainerView handleNIMTextMessage:message]; [self.roomMessageView handleNIMTextMessage:message];
} else if(message.messageType == NIMMessageTypeTip) { } else if(message.messageType == NIMMessageTypeTip) {
[self.messageContainerView handleNIMTextMessage:message]; [self.roomMessageView handleNIMTextMessage:message];
} }
} }
} }
@@ -317,81 +203,42 @@
if (message.messageType == NIMMessageTypeCustom) { if (message.messageType == NIMMessageTypeCustom) {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel * attachment = obj.attachment; [self.roomStageView handleNIMCustomMessage:message];
[self.stageView handleNIMCustomMessage:message]; [self.roomAnimationView handleNIMCustomMessage:message];
[self.animationView handleNIMCustomMessage:message]; [self.roomMessageView handleNIMCustomMessage:message];
[self.messageContainerView handleNIMCustomMessage:message];
// if (attachment.first == CustomMessageType_Face && attachment.second == Custom_Message_Sub_Face_Send) {
// NSLog(@"发送的表情:%@", attachment.data);
// }
} }
} else if(message.messageType == NIMMessageTypeText) { } else if(message.messageType == NIMMessageTypeText) {
[self.messageContainerView handleNIMTextMessage:message]; [self.roomMessageView handleNIMTextMessage:message];
} }
} }
#pragma mark - NIMLoginManagerDelegate
- (void)onKickout:(NIMLoginKickoutResult *)result {
}
#pragma mark - NIMConversationManagerDelegate
///
- (void)didAddRecentSession:(NIMRecentSession *)recentSession
totalUnreadCount:(NSInteger)totalUnreadCount {
[self.messageContainerView addNIMRecentSession:recentSession];
}
///
- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession
totalUnreadCount:(NSInteger)totalUnreadCount {
[self.messageContainerView addNIMRecentSession:recentSession];
}
///
- (void)didRemoveRecentSession:(NIMRecentSession *)recentSession
totalUnreadCount:(NSInteger)totalUnreadCount {
[self.messageContainerView removeNIMRecentSession:recentSession];
}
#pragma mark - Public Method #pragma mark - Public Method
/// ///
+ (BOOL)openRoom:(NSString *)roomUid viewController:(UIViewController *)viewController { + (BOOL)openRoom:(NSString *)roomUid viewController:(UIViewController *)viewController {
return [self openRoom:roomUid fromNick:nil fromType:0 fromUid:nil viewController:viewController];
}
///
+ (BOOL)openRoom:(NSString *)roomUid fromNick:(NSString *)fromNick fromType:(UserEnterRoomFromType)fromType fromUid:(NSString *)fromUid viewController:(UIViewController *)viewController {
MewRoomViewController *roomVC = [[self alloc] init]; MewRoomViewController *roomVC = [[self alloc] init];
roomVC.roomUid = roomUid; roomVC.roomUid = roomUid;
roomVC.fromNick = fromNick;
roomVC.fromType = fromType;
roomVC.fromUid = fromUid;
BaseNavigationController *baseNav = [[BaseNavigationController alloc] initWithRootViewController:roomVC]; BaseNavigationController *baseNav = [[BaseNavigationController alloc] initWithRootViewController:roomVC];
baseNav.modalPresentationStyle = UIModalPresentationFullScreen; baseNav.modalPresentationStyle = UIModalPresentationFullScreen;
[viewController presentViewController:baseNav animated:YES completion:nil]; [viewController presentViewController:baseNav animated:YES completion:nil];
return YES; return YES;
} }
#pragma mark - RoomHostDelegate #pragma mark - CHRoomHostDelegate
- (RoomInfoModel *)getRoomInfo { - (RoomInfoModel *)getRoomInformation {
return self.roomInfo; return self.roomInfo;
} }
- (UserInfoModel *)getUserInfo { - (UserInfoModel *)getUserInformation {
return self.userInfo; return self.userInfo;
} }
/// 退 /// 退
- (void)exitRoom { - (void)exitCurrentRoom {
// //
[self.animationView resumeTimer]; [self.roomAnimationView resumeTimer];
// //
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]]; [self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[RtcManager instance] exitRoom]; [[RtcManager instance] exitRoom];
@@ -400,17 +247,11 @@
} }
- (UINavigationController *)getCurrentNav { - (UINavigationController *)getCurrentNavigationController {
return self.navigationController; return self.navigationController;
} }
- (void)microQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
// [self.menuContainerView onMicroQueueUpdate:queue];
// [self.functionView onRoomUpdate];
// [self.functionView onMicroQueueUpdate:queue];
BOOL isOnMic = false; BOOL isOnMic = false;
for (MicroQueueModel * info in queue.allValues) { for (MicroQueueModel * info in queue.allValues) {
if (info.userInfo.uid > 0 && [AccountInfoStorage instance].getUid.integerValue == info.userInfo.uid) { if (info.userInfo.uid > 0 && [AccountInfoStorage instance].getUid.integerValue == info.userInfo.uid) {
@@ -418,37 +259,20 @@
break; break;
} }
} }
// if (isOnMic) {
// self.anchorScrollView.scrollEnabled = NO;
// } else {
// self.anchorScrollView.scrollEnabled = YES;
// }
} }
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid { - (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
return [self.stageView animationPointAtStageViewByUid:uid]; return [self.roomStageView animationPointAtStageViewByUid:uid];
} }
#pragma mark - YMRoomProtocol #pragma mark - YMRoomProtocol
/// ///
- (void)initEnterRoomSuccess:(RoomInfoModel *)roomInfo user:(UserInfoModel *)userInfo { - (void)initEnterRoomSuccess:(RoomInfoModel *)roomInfo user:(UserInfoModel *)userInfo {
[YMHUDTool hideHUDInView:self.navigationController.view]; [YMHUDTool hideHUDInView:self.navigationController.view];
userInfo.fromUid = self.fromUid;
userInfo.fromType = self.fromType;
userInfo.fromNick = self.fromNick;
self.userInfo = userInfo; self.userInfo = userInfo;
self.roomInfo = roomInfo; self.roomInfo = roomInfo;
if (roomInfo.valid) { if (roomInfo.valid) {
//// if (roomInfo.room)
// //
//
// //
[self.roomHeaderView onRoomEntered]; [self.roomHeaderView onRoomEntered];
[self.presenter enterNIMRoom:[NSString stringWithFormat:@"%ld",self.roomInfo.roomId] user:self.userInfo]; [self.presenter enterNIMRoom:[NSString stringWithFormat:@"%ld",self.roomInfo.roomId] user:self.userInfo];
//
//
} else { } else {
if ([self.roomUid isEqualToString:[NSString stringWithFormat:@"%ld", userInfo.uid]]) { if ([self.roomUid isEqualToString:[NSString stringWithFormat:@"%ld", userInfo.uid]]) {
// //
@@ -479,7 +303,7 @@
// IM // IM
- (void)enterRoomSuccess:(NIMChatroom *)chatRoom { - (void)enterRoomSuccess:(NIMChatroom *)chatRoom {
[YMHUDTool hideHUDInView:self.navigationController.view]; [YMHUDTool hideHUDInView:self.navigationController.view];
[self.stageView onRoomEntered]; [self.roomStageView onRoomEntered];
if (self.roomInfo != nil) { if (self.roomInfo != nil) {
[self.presenter reportUserInterRoom:[NSString stringWithFormat:@"%zd", self.roomInfo.uid]]; [self.presenter reportUserInterRoom:[NSString stringWithFormat:@"%zd", self.roomInfo.uid]];
@@ -505,7 +329,6 @@
/// ///
- (void)sendGiftSuccess:(GiftReceiveInfoModel *)receiveInfo originDic:(NSDictionary *)originDic uidCount:(NSInteger)uidCount { - (void)sendGiftSuccess:(GiftReceiveInfoModel *)receiveInfo originDic:(NSDictionary *)originDic uidCount:(NSInteger)uidCount {
NSLog(@"送礼物成功:%@ --- dict:%@",receiveInfo, originDic);
[YMHUDTool hideHUD]; [YMHUDTool hideHUD];
[self sendCustomMessage:receiveInfo oringinDic:originDic]; [self sendCustomMessage:receiveInfo oringinDic:originDic];
@@ -515,7 +338,7 @@
/// ///
- (void)sendGiftFailWithCode:(NSInteger)code msg:(NSString *)msg { - (void)sendGiftFailWithCode:(NSInteger)code msg:(NSString *)msg {
[YMHUDTool hideHUD]; [YMHUDTool hideHUD];
NSLog(@"送礼物失败:%@ --- code:%ld",msg, (long)code);
if (code == 31005) {// if (code == 31005) {//
[self showErrorToast:msg]; [self showErrorToast:msg];
} else { } else {
@@ -541,14 +364,13 @@
} }
- (void)sendCustomMessage:(AttachmentModel *)attachment { - (void)sendCustomMessage:(AttachmentModel *)attachment {
// MewSocialStageView *mewView = (MewSocialStageView *)self.stageView; NSString *sessionID = [NSString stringWithFormat:@"%ld", [self getRoomInformation].roomId];
NSString *sessionID = [NSString stringWithFormat:@"%ld", [self getRoomInfo].roomId];
NIMMessage *message = [[NIMMessage alloc] init]; NIMMessage *message = [[NIMMessage alloc] init];
NIMCustomObject *object = [[NIMCustomObject alloc] init]; NIMCustomObject *object = [[NIMCustomObject alloc] init];
object.attachment = attachment; object.attachment = attachment;
message.messageObject = object; message.messageObject = object;
UserInfoModel *userInfo = [self getUserInfo]; UserInfoModel *userInfo = [self getUserInformation];
YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init]; YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init];
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld",userInfo.uid]]; NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld",userInfo.uid]];
message.remoteExt = remoteExt; message.remoteExt = remoteExt;
@@ -566,7 +388,7 @@
} else if (target == 1) { } else if (target == 1) {
// 退 // 退
[self exitRoom]; [self exitCurrentRoom];
} else { } else {
// //
[self reportButton]; [self reportButton];
@@ -579,7 +401,7 @@
- (void)didSelectMewRoomRightViewWithTarget:(NSInteger)target { - (void)didSelectMewRoomRightViewWithTarget:(NSInteger)target {
if (target == 0) { if (target == 0) {
// //
self.inputTextView = [YMRoomSendTextView showTextView:self.view.superview.superview delegate:self atUid:nil atNick:nil]; [YMRoomSendTextView showTextView:self.view.superview.superview delegate:self];
} else if (target == 1) { } else if (target == 1) {
// //
[self randomEmoji]; [self randomEmoji];
@@ -609,16 +431,13 @@
self.isPlayEmojiAnimation = YES; self.isPlayEmojiAnimation = YES;
self.emojiImageView.hidden = NO; self.emojiImageView.hidden = NO;
if (self.playEmojiArrays.count > 0) { if (self.playEmojiArrays.count > 0) {
self.emojiImageView.image = [UIImage imageNamed:self.playEmojiArrays[0]]; self.emojiImageView.image = [UIImage imageNamed:self.playEmojiArrays[0]];
} }
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.isPlayEmojiAnimation = NO; self.isPlayEmojiAnimation = NO;
self.emojiImageView.hidden = YES; self.emojiImageView.hidden = YES;
if (self.playEmojiArrays.count > 0) { if (self.playEmojiArrays.count > 0) {
[self.playEmojiArrays removeObjectAtIndex:0]; [self.playEmojiArrays removeObjectAtIndex:0];
} }
@@ -629,33 +448,9 @@
}); });
} }
- (void)sendFaceCustomMessage:(NSInteger)faceId {
RoomFaceSendInfoModel *sendInfo = [[RoomFaceSendInfoModel alloc]init];
NSMutableArray *resultIndexs = [NSMutableArray array];
NSMutableArray *faceRecieveInfos = [NSMutableArray array];
sendInfo.nick = self.userInfo.nick;
sendInfo.faceId = faceId;
sendInfo.uid = self.userInfo.uid;
[faceRecieveInfos addObject:sendInfo.model2dictionary];
AttachmentModel * attachment = [[AttachmentModel alloc] init];
attachment.first = CustomMessageType_Face;
attachment.second = Custom_Message_Sub_Face_Send;
NSDictionary * dic = @{@"data":faceRecieveInfos, @"uid": @(self.userInfo.uid)};
attachment.data = dic;
NSString *sessionID = [NSString stringWithFormat:@"%ld",[self getRoomInfo].roomId];
NIMMessage *message = [[NIMMessage alloc]init];
NIMCustomObject *object = [[NIMCustomObject alloc] init];
object.attachment = attachment;
message.messageObject = object;
//
NIMSession *session = [NIMSession session:sessionID type:NIMSessionTypeChatroom];
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
[self dismissViewControllerAnimated:YES completion:nil];
}
/// ///
- (void)sendRoomGift { - (void)sendRoomGift {
MewSocialStageView *mewStageView = (MewSocialStageView *)self.stageView; MewSocialStageView *mewStageView = (MewSocialStageView *)self.roomStageView;
NSString *selectId = mewStageView.selectUid; NSString *selectId = mewStageView.selectUid;
if (selectId == [AccountInfoStorage instance].getUid) { if (selectId == [AccountInfoStorage instance].getUid) {
[self showErrorToast:@"不能赠送礼物给自己"]; [self showErrorToast:@"不能赠送礼物给自己"];
@@ -704,7 +499,7 @@
[self showSuccessToast:@"举报成功"]; [self showSuccessToast:@"举报成功"];
}]]; }]];
[alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){ [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){
[self showSuccessToast:@"举报成功"]; // [self showSuccessToast:@"举报成功"];
}]]; }]];
[self presentViewController:alert animated:YES completion:nil]; [self presentViewController:alert animated:YES completion:nil];
@@ -714,11 +509,11 @@
- (void)initView { - (void)initView {
[self.view addSubview:self.roomBgImageView]; [self.view addSubview:self.roomBgImageView];
[self.view addSubview:self.roomHeaderView]; [self.view addSubview:self.roomHeaderView];
[self.view addSubview:self.stageView]; [self.view addSubview:self.roomStageView];
[self.view insertSubview:self.roomRightView aboveSubview:self.stageView]; [self.view insertSubview:self.roomRightView aboveSubview:self.roomStageView];
[self.view addSubview:self.messageContainerView]; [self.view addSubview:self.roomMessageView];
[self.view insertSubview:self.emojiImageView aboveSubview:self.roomRightView]; [self.view insertSubview:self.emojiImageView aboveSubview:self.roomRightView];
[self.view addSubview:self.animationView]; [self.view addSubview:self.roomAnimationView];
[self initLayout]; [self initLayout];
} }
@@ -737,24 +532,24 @@
make.right.equalTo(self.view).offset(-32); make.right.equalTo(self.view).offset(-32);
}]; }];
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.roomStageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.roomRightView); make.top.equalTo(self.roomRightView);
make.left.right.equalTo(self.view); make.left.right.equalTo(self.view);
make.height.mas_equalTo(self.stageView.heightForStageView); make.height.mas_equalTo(self.roomStageView.heightForStageView);
}]; }];
[self.messageContainerView mas_makeConstraints:^(MASConstraintMaker *make) { [self.roomMessageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.stageView.mas_bottom); make.top.equalTo(self.roomStageView.mas_bottom);
make.left.right.equalTo(self.view); make.left.right.equalTo(self.view);
make.bottom.mas_equalTo(-kSafeAreaBottomHeight); make.bottom.mas_equalTo(-kSafeAreaBottomHeight);
}]; }];
[self.emojiImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.emojiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.stageView); make.centerX.equalTo(self.roomStageView);
make.bottom.equalTo(self.stageView).offset(-60); make.bottom.equalTo(self.roomStageView).offset(-60);
}]; }];
[self.animationView mas_makeConstraints:^(MASConstraintMaker *make) { [self.roomAnimationView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view); make.edges.mas_equalTo(self.view);
}]; }];
} }
@@ -786,18 +581,18 @@
return _roomRightView; return _roomRightView;
} }
- (StageView *)stageView { - (CHStageView *)roomStageView {
if (!_stageView) { if (!_roomStageView) {
_stageView = [[MewSocialStageView alloc] initWithDelegate:self]; _roomStageView = [[MewSocialStageView alloc] initWithDelegate:self];
} }
return _stageView; return _roomStageView;
} }
- (YMRoomMessageContainerView *)messageContainerView { - (YMRoomMessageContainerView *)roomMessageView {
if (!_messageContainerView) { if (!_roomMessageView) {
_messageContainerView = [[YMRoomMessageContainerView alloc] initWithDelegate:self]; _roomMessageView = [[YMRoomMessageContainerView alloc] initWithDelegate:self];
} }
return _messageContainerView; return _roomMessageView;
} }
- (UIImageView *)emojiImageView { - (UIImageView *)emojiImageView {
@@ -807,11 +602,11 @@
return _emojiImageView; return _emojiImageView;
} }
- (YMRoomAnimationView *)animationView { - (YMRoomAnimationView *)roomAnimationView {
if (!_animationView) { if (!_roomAnimationView) {
_animationView = [[YMRoomAnimationView alloc] initWithDelegate:self]; _roomAnimationView = [[YMRoomAnimationView alloc] initWithDelegate:self];
} }
return _animationView; return _roomAnimationView;
} }
@end @end

View File

@@ -6,8 +6,8 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
#import "RoomGuestDelegate.h" #import "CHRoomGuestDelegate.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// index : 1 - 退出房间 2-举报房间 /// index : 1 - 退出房间 2-举报房间
@@ -23,9 +23,9 @@ typedef void(^selectFilterClouse)(NSInteger index);
- (void)didSelectMewRoomHeaderViewTarget:(NSInteger)target; - (void)didSelectMewRoomHeaderViewTarget:(NSInteger)target;
@end @end
@interface MewRoomHeaderView : UIView<RoomGuestDelegate> @interface MewRoomHeaderView : UIView<CHRoomGuestDelegate>
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate; - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
@property (nonatomic, weak) id<MewRoomHeaderViewDelegate> delegate; @property (nonatomic, weak) id<MewRoomHeaderViewDelegate> delegate;
@end @end

View File

@@ -17,7 +17,6 @@
#import "UserInfoModel.h" #import "UserInfoModel.h"
#pragma mark - view退 #pragma mark - view退
@interface MewRoomHeaderFilterView() @interface MewRoomHeaderFilterView()
@property (nonatomic, strong) UIButton *exitButton; @property (nonatomic, strong) UIButton *exitButton;
@property (nonatomic, strong) UIButton *reportButton; @property (nonatomic, strong) UIButton *reportButton;
@@ -144,7 +143,7 @@ static MewRoomHeaderFilterView *_filterView = nil;
/// 退 /// 退
@property (nonatomic, strong) UIButton *filterButton; @property (nonatomic, strong) UIButton *filterButton;
@property (nonatomic, weak) id<RoomHostDelegate> hostDelegate; @property (nonatomic, weak) id<CHRoomHostDelegate> hostDelegate;
/// ///
@property (nonatomic, assign) BOOL hadShowCollectInScreen; @property (nonatomic, assign) BOOL hadShowCollectInScreen;
@@ -153,7 +152,7 @@ static MewRoomHeaderFilterView *_filterView = nil;
@implementation MewRoomHeaderView @implementation MewRoomHeaderView
#pragma mark - Init #pragma mark - Init
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate { - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
self = [super init]; self = [super init];
if (self) { if (self) {
_hostDelegate = delegate; _hostDelegate = delegate;
@@ -162,9 +161,9 @@ static MewRoomHeaderFilterView *_filterView = nil;
return self; return self;
} }
#pragma mark - RoomGuestDelegate #pragma mark - CHRoomGuestDelegate
- (void)onRoomEntered { - (void)onRoomEntered {
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel* roomInfo = self.hostDelegate.getRoomInformation;
if (roomInfo) { if (roomInfo) {
self.roomTitleLabel.text = roomInfo.title; self.roomTitleLabel.text = roomInfo.title;
@@ -183,37 +182,12 @@ static MewRoomHeaderFilterView *_filterView = nil;
- (void)roomCollectButtonAction:(UIButton *)sender { - (void)roomCollectButtonAction:(UIButton *)sender {
NSString *type = sender.selected ? @"2" : @"1"; NSString *type = sender.selected ? @"2" : @"1";
NSString *uid = [AccountInfoStorage instance].getUid; NSString *uid = [AccountInfoStorage instance].getUid;
NSString *roomUid = [NSString stringWithFormat:@"%ld",self.hostDelegate.getRoomInfo.uid]; NSString *roomUid = [NSString stringWithFormat:@"%ld",self.hostDelegate.getRoomInformation.uid];
[Api collectRoom:^(BaseModel * _Nonnull data, NSInteger code, NSString * _Nonnull msg) { [Api collectRoom:^(BaseModel * _Nonnull data, NSInteger code, NSString * _Nonnull msg) {
if (code == 200) { if (code == 200) {
sender.selected = !sender.selected; sender.selected = !sender.selected;
if ([type isEqualToString:@"1"]) {/// if ([type isEqualToString:@"1"]) {///
[YMHUDTool showSuccessWithMessage:@"收藏成功"]; [YMHUDTool showSuccessWithMessage:@"收藏成功"];
sender.selected = YES;
if (self.hadShowCollectInScreen) {
return;
}
self.hadShowCollectInScreen = YES;
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic safeSetObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
[dic safeSetObject:self.hostDelegate.getUserInfo.nick forKey:@"nick"];
[dic safeSetObject:[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid] forKey:@"targetUid"];
[dic safeSetObject:self.hostDelegate.getRoomInfo.nick forKey:@"targetNick"];
NSMutableDictionary * data = [@{@"data":dic} mutableCopy];
[data safeSetObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
AttachmentModel *attachment = [[AttachmentModel alloc]init];
attachment.first = CustomMessageType_Collection_Room;
attachment.second = Custom_Message_Sub_Collect_Room_Tips;
attachment.data = data;
NIMMessage *message = [[NIMMessage alloc]init];
NIMCustomObject *object = [[NIMCustomObject alloc] init];
object.attachment = attachment;
message.messageObject = object;
NSString *sessionId = [NSString stringWithFormat:@"%ld",self.hostDelegate.getRoomInfo.roomId];
//
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
} }
} else { } else {
[YMHUDTool showErrorWithMessage:msg]; [YMHUDTool showErrorWithMessage:msg];
@@ -228,7 +202,6 @@ static MewRoomHeaderFilterView *_filterView = nil;
// 退 // 退
- (void)filterButtonAction:(UIButton *)sender { - (void)filterButtonAction:(UIButton *)sender {
[MewRoomHeaderFilterView showMewRoomHeadrFilterViewOrigin:CGPointMake(KScreenWidth - 97 - 20, CGRectGetMaxY(self.frame)) selectFilterClouseEvent:^(NSInteger index) { [MewRoomHeaderFilterView showMewRoomHeadrFilterViewOrigin:CGPointMake(KScreenWidth - 97 - 20, CGRectGetMaxY(self.frame)) selectFilterClouseEvent:^(NSInteger index) {
if (self.delegate) { if (self.delegate) {
[self.delegate didSelectMewRoomHeaderViewTarget:index]; [self.delegate didSelectMewRoomHeaderViewTarget:index];
@@ -271,7 +244,6 @@ static MewRoomHeaderFilterView *_filterView = nil;
- (UILabel *)roomTitleLabel { - (UILabel *)roomTitleLabel {
if (!_roomTitleLabel) { if (!_roomTitleLabel) {
_roomTitleLabel = [[UILabel alloc] init]; _roomTitleLabel = [[UILabel alloc] init];
_roomTitleLabel.text = @"房间名称";
_roomTitleLabel.textColor = UIColor.whiteColor; _roomTitleLabel.textColor = UIColor.whiteColor;
_roomTitleLabel.font = kFontMedium(18); _roomTitleLabel.font = kFontMedium(18);
} }
@@ -283,8 +255,6 @@ static MewRoomHeaderFilterView *_filterView = nil;
_roomCollectButton = [[UIButton alloc] init]; _roomCollectButton = [[UIButton alloc] init];
[_roomCollectButton setImage:[UIImage imageNamed:@"mew_room_collect"] forState:UIControlStateNormal]; [_roomCollectButton setImage:[UIImage imageNamed:@"mew_room_collect"] forState:UIControlStateNormal];
[_roomCollectButton setImage:[UIImage imageNamed:@"mew_room_collected"] forState:UIControlStateSelected]; [_roomCollectButton setImage:[UIImage imageNamed:@"mew_room_collected"] forState:UIControlStateSelected];
// [_roomCollectButton setTitle:@"收藏" forState:UIControlStateNormal];
// [_roomCollectButton setTitle:@"已收藏" forState:UIControlStateSelected];
_roomCollectButton.selected = NO; _roomCollectButton.selected = NO;
[_roomCollectButton addTarget:self action:@selector(roomCollectButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [_roomCollectButton addTarget:self action:@selector(roomCollectButtonAction:) forControlEvents:UIControlEventTouchUpInside];
} }

View File

@@ -5,11 +5,11 @@
// Created by 触海 on 2023/11/14. // Created by 触海 on 2023/11/14.
// //
#import "StageView.h" #import "CHStageView.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface MewSocialStageView : StageView @interface MewSocialStageView : CHStageView

View File

@@ -33,10 +33,6 @@
#define secondRowTop (firstRowTop + mcHeight + marginV2) #define secondRowTop (firstRowTop + mcHeight + marginV2)
@interface MewSocialStageView() @interface MewSocialStageView()
////
//@property (nonatomic, assign) BOOL isSelectMicUser;
//// id
//@property (nonatomic, strong) NSString *selectUid;
@end @end
@@ -91,44 +87,11 @@
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2; return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2;
} }
//- (void)didSelectAtIndex:(NSInteger)index {
// [super didSelectAtIndex:index];
// self.isSelectMicUser = !self.isSelectMicUser;
// NSArray<UIView<MicroViewProtocol> *> *microViews = [self getAllMicroViewArray];
// for (UIView<MicroViewProtocol> *view in microViews) {
// view.layer.borderColor = UIColor.clearColor.CGColor;
// view.layer.borderWidth = 0.0;
// }
//
// MicroQueueModel* micModel = [[self getMicroQueue] objectForKey:[self indexToPosition:index]];
// if (micModel.userInfo && micModel.userInfo.uid > 0) {
// self.selectUid = [NSString stringWithFormat:@"%ld",micModel.userInfo.uid];
// //
// UIView<MicroViewProtocol> *selectMicroView = [self findMicroViewByIndex:index];
// UIColor *color = self.isSelectMicUser ? [ThemeColor colorWithHexString:@"#9552FF"] : UIColor.clearColor;
// CGFloat border = self.isSelectMicUser ? 2.0 : 0.0;
// selectMicroView.layer.borderColor = color.CGColor;
// selectMicroView.layer.borderWidth = border;
// }
//}
//- (NSString *)mewMicroSelectUid {
// return self.selectUid;
//}
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid { - (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
NSInteger index = [self getIndexByUid:uid]; NSInteger index = [self getIndexByUid:uid];
CGPoint point = CGPointZero; CGPoint point = CGPointZero;
// if (index == -1 && self.hostDelegate.getRoomInfo.leaveMode && self.hostDelegate.getRoomInfo.uid == uid.integerValue) {
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
// }
if (index == 0) { if (index == 0) {
// CGRectMake(paddingH, ownerTopMargin, ownerWidth, ownerHeight);
point = CGPointMake(paddingH + ownerWidth/2, ownerHeight / 2 - 10 + ownerTopMargin); point = CGPointMake(paddingH + ownerWidth/2, ownerHeight / 2 - 10 + ownerTopMargin);
} }

View File

@@ -23,7 +23,7 @@
self.position = model.microState.position; self.position = model.microState.position;
[super configMicroView:model]; [super configMicroView:model];
MicroStateModel *micState = model.microState; MicroStateModel *micState = model.microState;
UserInfoModel *userInfo = model.userInfo; // UserInfoModel *userInfo = model.userInfo;
UIImage *image = [UIImage imageNamed:@"mew_room_position_empty"]; UIImage *image = [UIImage imageNamed:@"mew_room_position_empty"];
if (micState.position == -1) { if (micState.position == -1) {

View File

@@ -182,13 +182,8 @@ NSString * const kCancelAccount = @"cancelAccount";
if (![_url hasPrefix:@"http"] && ![_url hasPrefix:@"https"]){ if (![_url hasPrefix:@"http"] && ![_url hasPrefix:@"https"]){
_url = [NSString stringWithFormat:@"%@/%@", [NewEncryptTool MEW_aesDecrypt:API_HOST_H5_URL], _url]; _url = [NSString stringWithFormat:@"%@/%@", [NewEncryptTool MEW_aesDecrypt:API_HOST_H5_URL], _url];
} }
if (![_url containsString:@"alipayh5"]) {
if (![_url containsString:@"?"]) {
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]]; _url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
} else {
_url = [NSString stringWithFormat:@"%@&platform=%@", _url, [YYUtility appName]];
}
}
// urlString // urlString
NSString *noSpaceTextUrl = [_url stringByReplacingOccurrencesOfString:@" " withString:@""]; NSString *noSpaceTextUrl = [_url stringByReplacingOccurrencesOfString:@" " withString:@""];

View File

@@ -14,98 +14,18 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
CustomMessageType_Room_Tip = 2, CustomMessageType_Room_Tip = 2,
///送礼物的接口 ///送礼物的接口
CustomMessageType_Gift = 3, CustomMessageType_Gift = 3,
///账户更新
CustomMessageType_Account = 5,
///关注的主播上线
CustomMessageType_Member_Online = 6,
///队列操作 ///队列操作
CustomMessageType_Queue = 8, CustomMessageType_Queue = 8,
///表情 ///表情
CustomMessageType_Face = 9, CustomMessageType_Face = 9,
///推文
CustomMessageType_Tweet = 10,
///全麦送 ///全麦送
CustomMessageType_AllMicroSend = 12, CustomMessageType_AllMicroSend = 12,
///座驾进房动画
CustomMessageType_Car_Notify = 15,
///踢出房间 ///踢出房间
CustomMessageType_Kick_User = 18, CustomMessageType_Kick_User = 18,
///小秘书消息 ///小秘书消息
CustomMessageType_Secretary = 19, CustomMessageType_Secretary = 19,
///房间信息更新
CustomMessageType_Update_RoomInfo = 20,
///应用内分享
CustomMessageType_Application_Share = 22,
///系统通知,自定义布局消息(带确认、取消)
CustomMessageType_Message_Handle = 23,
///用户升级
CustomMessageType_User_UpGrade = 24,
///糖果树
CustomMessageType_Candy_Tree = 26,
///排麦
CustomMessageType_Arrange_Mic = 30,
///房间内PK
CustomMessageType_Room_PK = 31,
///家族
CustomMessageType_Hall = 32,
///房间礼物值 ///房间礼物值
CustomMessageType_Room_GiftValue = 42, CustomMessageType_Room_GiftValue = 42,
///版本升级
CustomMessageType_Version_Update = 49,
///公会超管
CustomMessageType_Hall_Super_Admin = 50,
///动态
CustomMessageType_Monents = 52,
///欢迎Ta
CustomMessageType_Room_Welcome = 56,
///收藏房间
CustomMessageType_Collection_Room = 59,
///房间红包
CustomMessageType_RedPacket = 60,
///福袋消息
CustomMessageType_LuckyBag = 61,
///发现萌新
CustomMessageType_FindNew = 62,
///塔罗
CustomMessageType_Tarot = 71,
///相亲
CustomMessageType_RoomPlay_Dating = 72,
///私聊风险提醒
CustomMessageType_Chat_Risk_Alert = 75,
///首充奖励
CustomMessageType_First_Recharge_Reward = 76,
///访客记录
CustomMessageType_First_VisitorRecord = 78,
///航海
CustomMessageType_Room_Sailing = 81,
///跨房PK
CustomMessageType_Across_Room_PK = 83,
///贵族VIP
CustomMessageType_Noble_VIP = 85,
///个播房观众点击空坑位,房主收到请求上麦提示
CustomMessageType_AnchorRoom_AudienceUpMic = 86,
///技能卡
CustomMessageType_Skill_Card = 87,
///个播小时榜
CustomMessageType_Anchor_Hour_Rank = 89,
///个播粉丝团
CustomMessageType_Anchor_FansTeam = 90,
///牌照房小时榜
CustomMessageType_Licnese_Hour_Rank = 91,
///任务完成通知
CustomMessageType_Task_Complete = 92,
///礼物合成
CustomMessageType_Gift_Compound = 93,
///涂鸦礼物
CustomMessageType_Graffiti_Gift = 94,
///心愿礼物
CustomMessageType_Wish_Gift = 95,
///星级厨房
CustomMessageType_Starred_Kitchen = 96,
///特权卡
CustomMessageType_Privilege_Card = 102,
///发起邀请
CustomMessageType_Initiat_Invitation = 103,
}; };
@@ -127,22 +47,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubGift) {
Custom_Message_Sub_Gift_LuckySend = 34, Custom_Message_Sub_Gift_LuckySend = 34,
}; };
///first = CustomMessageType_Account
typedef NS_ENUM(NSUInteger, CustomMessageSubAccount) {
//账户余额钻石变更
Custom_Message_Sub_Account_Changed = 51,
};
///first = CustomMessageType_Member_Online
typedef NS_ENUM(NSInteger, CustomMessageSubOnLine) {
///房主的主播上线了
Custom_Message_Type_Attention_Member_Online = 61
};
///first = CustomMessageType_Queue ///first = CustomMessageType_Queue
typedef NS_ENUM(NSInteger, CustomMessageSubQueue) { typedef NS_ENUM(NSInteger, CustomMessageSubQueue) {
///邀请上麦
Custom_Message_Sub_Queue_Invite = 81,
///踢下麦 ///踢下麦
Custom_Message_Sub_Queue_Kick = 82, Custom_Message_Sub_Queue_Kick = 82,
}; };
@@ -153,12 +59,6 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubFace) {
Custom_Message_Sub_Face_Send = 91, Custom_Message_Sub_Face_Send = 91,
}; };
///first == CustomMessageType_Tweet
typedef NS_ENUM(NSInteger, CustomMessageSubTweet) {
///推文的内容
Custom_Message_Sub_Tweet_News = 101,
};
///first = CustomMessageType_ALLMicroSend ///first = CustomMessageType_ALLMicroSend
typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) { typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) {
///全麦送礼物 ///全麦送礼物
@@ -171,10 +71,6 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) {
Custom_Message_Sub_AllMicroLuckySend = 125, Custom_Message_Sub_AllMicroLuckySend = 125,
}; };
///first == CustomMessageType_Car_Notify
typedef NS_ENUM(NSUInteger, CustomMessageSubCar) {
Custom_Message_Sub_Car_EnterRoom = 159, //进房动画
};
///first = CustomMessageType_Kick_User ///first = CustomMessageType_Kick_User
typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) { typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) {
@@ -185,377 +81,12 @@ typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) {
}; };
///first = CustomMessageType_Secretary
typedef NS_ENUM(NSUInteger, CustomNotificationSecretary) {
///跳转页面
Custom_Message_Sub_Secretary_Router = 191,
};
///first = CustomMessageType_Update_RoomInfo
typedef NS_ENUM(NSUInteger, CustomMessageSubUpdateRoomInfo) {
///动画开关状态更新
Custom_Message_Sub_Update_RoomInfo_AnimateEffect = 201,
///公屏开关更新
Custom_Message_Sub_Update_RoomInfo_MessageState = 203,
///通用公屏提示文案, 公屏纯文本展示消息 data[@"tip"]
Custom_Message_Sub_Update_RoomInfo_Notice = 204,
///红包开关通知
Custom_Message_Sub_Update_RoomInfo_RedPacket = 205,
///清空公屏
Custom_Message_Sub_Update_RoomInfo_CleanScreen = 206,
};
///first = CustomMessageType_Application_Share
typedef NS_ENUM(NSInteger, CustomMessageSubApplicationShare) {
///分享房间
Custom_Message_Sub_Application_Share_Room = 221,
};
///first = CustomMessageType_Applica
typedef NS_ENUM(NSInteger, CustomMessageSubMessageHandle) {
Custom_Message_Sub_Message_Handle_Content = 231, //文本
Custom_Message_Sub_Message_Handle_Bussiness = 232, //业务
};
///first = CustomMessageType_User_UpGrade
typedef NS_ENUM(NSInteger, CustomMessageSubUserUpgrade) {
///用户等级
Custom_Message_Sub_User_UpGrade_Exper = 241,
///魅力等级
Custom_Message_Sub_User_UpGrade_Charm = 242
};
///first = CustomMessageType_Candy_Tree
typedef NS_ENUM(NSUInteger, CustomMessageSubCandyTree) {
//.自己可见 一级礼物(最小)
Custom_Message_Sub_Candy_Tree_Me = 261,
///当前房间可见 二级礼物
Custom_Message_Sub_Candy_Tree_InRoom = 262,
///所有房间可见 三级礼物
Custom_Message_Sub_Candy_Tree_AllRoom = 263,
///所有房间可见+小秘书 四级礼物
Custom_Message_Sub_Candy_Tree_AllRoom_Notify = 264,
///五级礼物
Custom_Message_Sub_Candy_Tree_InRoom_NeedAllMicSend = 265,
//暴击的没用 不写了
};
///first = CustomMessageType_Arrange_Mic
typedef NS_ENUM(NSUInteger, CustomNotiHeaderArrangeMic) {
///队列从无人排麦到有人排麦
Custom_Message_Sub_Arrange_Mic_Non_Empty= 301,
///队列从有人排麦到无人排麦
Custom_Message_Sub_Arrange_Mic_Empty= 302,
///开启排麦
Custom_Message_Sub_Arrange_Mic_Mode_Open= 303,
///关闭排麦
Custom_Message_Sub_Arrange_Mic_Mode_Close= 304,
///将坑位设置成自由麦
Custom_Message_Sub_Arrange_Mic_Free_Mic_Open= 305,
///将坑位设置为排麦
Custom_Message_Sub_Arrange_Mic_Free_Mic_Close= 306,
};
///first =CustomMessageType_Room_PK
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomPK){
///从无人报名pk排麦到有人报名pk排麦
Custom_Message_Sub_Room_PK_Non_Empty = 311,
///从有人报名pk排麦到无人报名pk排麦
Custom_Message_Sub_Room_PK_Empty = 312,
///创建了pk模式
Custom_Message_Sub_Room_PK_Mode_Open = 313,
///关闭pk模式
Custom_Message_Sub_Room_PK_Mode_Close = 314,
///pk开始
Custom_Message_Sub_Room_PK_Start = 315,
///pk结果
Custom_Message_Sub_Room_PK_Result = 316,
///重新开始
Custom_Message_Sub_Room_PK_Re_Start= 317,
///管理员邀请上麦(只用在客户端)
Custom_Message_Sub_Room_PK_Manager_Up_Mic = 318,
};
///first=CustomMessageType_Hall
typedef NS_ENUM(NSUInteger, Custom_Noti_Sub_HALL) {
///申请加入厅
Custom_Message_Sub_Hall_Apply_Join = 321,
///管理邀请入厅
Custom_Message_Sub_Hall_Manager_Invite = 322,
///申请退出厅
Custom_Message_Sub_Hall_Apply_Exit = 323,
///模厅普通通知
Custom_Message_Sub_Hall_Notice = 324,
///设置为模厅
Custom_Message_Sub_Hall_Become_Hall = 325,
};
///first = CustomMessageType_Room_GiftValue ///first = CustomMessageType_Room_GiftValue
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomGiftValue) { typedef NS_ENUM(NSUInteger, CustomMessageSubRoomGiftValue) {
///礼物值同步 ///礼物值同步
Custom_Message_Sub_Room_GiftValue_Sync = 421 Custom_Message_Sub_Room_GiftValue_Sync = 421
}; };
///first = CustomMessageType_Version_Update)
typedef NS_ENUM(NSUInteger, CustomMessageVersionUpdateValue) {
///版本升级
Custom_Message_Version_Update_Value = 491
};
///first = CustomMessageType_Hall_Super_Admin
typedef NS_ENUM(NSInteger, CustomMessageSubHallSuperAdmin) {
///超管解除陪伴房的进房限制
Custom_Message_Sub_Hall_Super_Admin_Remove_CP_Room_Limit = 501,
///超管解除多人房的房间密码
Custom_Message_Sub_Hall_Super_Admin_Remove_Room_Pwd = 502,
///锁麦
Custom_Message_Sub_Hall_Super_Admin_Lock_Mic = 503,
///闭麦
Custom_Message_Sub_Hall_Super_Admin_Mute_Mic = 504,
///踢人下麦
Custom_Message_Sub_Hall_Super_Admin_Kick_Down_Mic = 505,
///拉黑
Custom_Message_Sub_Hall_Super_Admin_Mark_Black = 506,
///踢出房间
Custom_Message_Sub_Hall_Super_Admin_Kick_Out_Room = 507,
///踢管理员出房间
Custom_Message_Sub_Hall_Super_Admin_Kick_Manager_Out_Room = 508,
};
/// first == CustomMessageType_Monents
typedef NS_ENUM(NSUInteger, Custom_Noti_Sub_Dynamic) {
///未读更新
Custom_Message_Sub_Monents_Unread_Update = 521,
/// 违禁删除
Custom_Message_Sub_Monents_Ban_Delete = 522,
/// 动态审核通过
Custom_Message_Sub_Monents_Approved = 523,
/// app内分享动态
Custom_Message_Sub_Monents_Share = 524,
};
///first = CustomMessageType_Room_Welcome
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomWelcome) {
///欢迎Ta
Custom_Message_Sub_Room_Welcome = 561,
};
///first = CustomMessageType_RedPacket
typedef NS_ENUM(NSUInteger, CustomMessageSubRedPacket) {
Custom_Message_Sub_RoomGiftRedPacket = 601, //房间礼物红包
Custom_Message_Sub_RoomDiamandRedPacket = 602, //房间钻石红包
Custom_Message_Sub_AllGiftRedPacket = 603, //全服礼物红包
Custom_Message_Sub_AllDiamandRedPacket = 604, //全服钻石红包
Custom_Message_Sub_OpenRedPacketSuccess = 605,//抢红包成功
};
///first = CustomMessageType_Collection_Room
typedef NS_ENUM(NSUInteger, CustomMessageSubCollectRoom) {
/// 福袋礼物房间飘屏通知
Custom_Message_Sub_Room_Gift_LuckBag= 610,
/// 福袋礼物全服飘屏通知
Custom_Message_Sub_Room_Gift_LuckBag_Server = 611,
};
///first == CustomMessageType_FindNew 发现萌新
typedef NS_ENUM(NSUInteger, CustomMessageFindNewUserGreet) {
/// 打招呼
Custom_Message_Find_New_Greet_New_User = 621,
};
///跳转类型
typedef NS_ENUM(NSUInteger, CustomMessageRouter) {
/// 跳转H5
Custom_Message_Router_H5 = 2,
};
///first = CustomMessageType_LuckyBag
typedef NS_ENUM(NSUInteger, CustomMessageSubLuckyBag) {
///收藏房间公屏提示消息
Custom_Message_Sub_Collect_Room_Tips = 591,
/// 提醒用户收藏房间
Custom_Message_Sub_Collect_Room_Remind_User = 592,
};
///CustomMessageType_Tarot
typedef NS_ENUM(NSUInteger, CustomMessageSubTarot) {
/// 塔罗中奖消息
Custom_Message_Sub_Tarot = 711,
};
///CustomMessageType_RoomPlay_Dating
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomPlayDating){
///选择心动用户
Custom_Message_Sub_Room_Play_Dating_Pick_Heart= 721,
///公布结果
Custom_Message_Sub_Room_Play_Dating_Public_Result = 722,
///选择了对象 但不是互选 客户端收到结果之后自动加到 公屏上
Custom_Message_Sub_Room_Play_Dating_Result_Not_Mutual = 723,
///互选的 客户端收到结果之后自动加到 公屏上
Custom_Message_Sub_Room_Play_Dating_Result_Mutual = 724,
};
///first = CustomMessageType_Chat_Risk_Alert
/// 访客记录
typedef NS_ENUM(NSUInteger, CustomMessageSubChatRiskAlert) {
/// 私聊风险提醒
Custom_Message_Sub_Chat_Risk_Alert= 751,
};
///first = CustomMessageType_First_Recharge_Reward
typedef NS_ENUM(NSUInteger, CustomMessageSubFirstRecharge) {
/// 首充完成
Custom_Message_Sub_Room_First_Recharge_Reward= 761,
/// 新用户专享优惠充值完成
Custom_Message_Sub_New_User_Recharge_Reward = 762,
};
/// 访客记录
typedef NS_ENUM(NSUInteger, CustomMessageSubVisitorRecord) {
/// 访客记录
Custom_Message_Sub_Visitor_Record = 781,
};
///first == CustomMessageType_Room_Sailing
typedef NS_ENUM(NSInteger, CustomMessageSubSailing) {
//自己可见 一级礼物(最小)
Custom_Message_Sub_Sailing_Me = 811,
//当前房间可见 二级礼物
Custom_Message_Sub_Sailing_InRoom = 812,
//所有房间可见 三级礼物
Custom_Message_Sub_Sailing_AllRoom = 813,
//所有房间可见+小秘书 四级礼物(最大)
Custom_Message_Sub_Sailing_AllRoom_Notify = 814,
//开箱子开到全麦送 (服务端发)
Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend = 815,
};
///first = CustomMessageType_Across_Room_PK
typedef NS_ENUM(NSUInteger, CustomMessageSubAcrossRoomPK) {
/// 收到跨房PK邀请
Custom_Message_Sub_AcrossRoomPK_Invite = 831,
/// 拒绝跨房PK
Custom_Message_Sub_AcrossRoomPK_Reject = 832,
/// 接受跨房PK
Custom_Message_Sub_AcrossRoomPK_Accept = 833,
/// 面板消息
Custom_Message_Sub_AcrossRoomPK_Panel = 834,
/// 跨房PK结束通知
Custom_Message_Sub_AcrossRoomPK_End = 835,
/// 跨房PK结束飘屏
Custom_Message_Sub_AcrossRoomPK_Result = 836,
///收到个播PK邀请
Custom_Message_Sub_AnchorPK_Invite = 837,
///拒绝个播pk
Custom_Message_Sub_AnchorPK_Reject = 838,
///接收个播PK
Custom_Message_Sub_AnchorPK_Accept = 839,
///个播PK面板消息
Custom_Message_Sub_AnchorPK_Panel = 8310,
///个播PK结束通知收到后进入惩罚阶段)
Custom_Message_Sub_AnchorPK_End = 8311,
///个播PK结束飘屏
Custom_Message_Sub_AnchorPK_Result = 8312,
///个播PK完成
Custom_Message_Sub_AnchorPK_Finish = 8313,
///收到预约PK倒计时
Custom_Message_Sub_PK_BeginTime = 8314,
///匹配个播随机PK等待超时
Custom_Message_Sub_AnchorPK_Match_TimeOut = 8315,
///个播pk禁用对方麦克风
Custom_Message_Sub_AnchorPK_MuteOtherMic = 8316,
};
///first = CustomMessageType_Noble_VIP
typedef NS_ENUM(NSUInteger, CustomMessageSubNobleVIP) {
/// 开通贵族房内消息(公屏显示)
Custom_Message_Sub_Room_Open_Noble_VIP = 851,
/// 开通贵族成功通知消息
Custom_Message_Sub_Open_Noble_Success = 852,
/// 贵族升级房内消息(公屏显示)
Custom_Message_Sub_Room_Noble_LevelUp = 853,
/// 贵族升级用户通知消息(弹窗)
Custom_Message_Sub_Noble_LevelUp_User = 854,
/// 贵族升级全服飘屏通知消息
Custom_Message_Sub_Room_Noble_LevelUp_Suspend = 855,
/// 贵族升级全服房间公屏通知消息
Custom_Message_Sub_AllRoom_Noble_LevelUp_Suspend = 856,
/// 贵族小喇叭房间消息
Custom_Message_Sub_Room_Trumpet = 857,
};
///first = CustomMessageType_Anchor_Hour_Rank
typedef NS_ENUM(NSUInteger, CustomMessageAnchorHourRank) {
///个播小时榜
Custom_Message_Sub_Anchor_Hour_Rank = 891,
};
///first = CustomMessageType_Anchor_FansTeam
typedef NS_ENUM(NSUInteger, CustomMessageAnchorFansTeam) {
///开通粉丝团成功
Custom_Message_Sub_FansTeam_Open_Success = 901,
///开通粉丝团失败
Custom_Message_Sub_FansTeam_Open_Fail = 902,
///用户加入粉丝团成功
Custom_Message_Sub_FansTeam_Join_Success = 903,
///用户退出粉丝团成功
Custom_Message_Sub_FansTeam_Out_Success = 904,
};
///first = CustomMessageType_Licnese_Hour_Rank
typedef NS_ENUM(NSUInteger, CustomMessageLicneseHourRank) {
///牌照房小时榜
Custom_Message_Sub_Licnese_Hour_Rank = 911,
};
///first = CustomMessageType_Task_Complete
typedef NS_ENUM(NSUInteger, CustomMessageTaskComplete) {
///任务完成通知
Custom_Message_Sub_TaskComplete = 921,
};
///first = CustomMessageType_Gift_Compound
typedef NS_ENUM(NSUInteger, CustomMessageGiftCompound) {
///礼物合成通知
Custom_Message_Sub_Gift_Compound = 931,
};
///first = CustomMessageType_Graffiti_Gift
typedef NS_ENUM(NSUInteger, CustomMessageGraffitiGift) {
///涂鸦礼物
Custom_Message_Sub_Graffiti_Gift = 941,
};
typedef NS_ENUM(NSInteger, CustomMessageWishGift) {
///开启心愿礼物
Custom_Message_Sub_Wish_Gift_Open = 951,
///心愿礼物完成
Custom_Message_Sub_Wish_Gift_Finish = 952,
///心愿礼物庆祝动效
Custom_Message_Sub_Wish_Gift_Gelebrate = 953,
///心愿礼物进度更新
Custom_Message_Sub_Wish_Gift_Update = 954,
///心愿礼物进度关闭
Custom_Message_Sub_Wish_Gift_Close = 955,
};
///星级厨房 CustomMessageType_Starred_Kitchen = 96,
typedef NS_ENUM(NSInteger, CustomMessageStarredKitchen) {
///星级厨房礼物房间飘屏通知(静态)
Custom_Message_Sub_Starred_Kitchen_Banner_Static = 960,
///星级厨房礼物房间飘屏通知动态)
Custom_Message_Sub_Starred_Kitchen_Banner_Dynamic = 961 ,
};
///发起邀请 CustomMessageType_Initiat_Invitation
typedef NS_ENUM(NSInteger, CustomMessageTypeInitiatInvitation) {
///发起用户或接单用户
Custom_Message_Sub_Initiat_Invitation_Initiating_User = 1030,
};
@interface AttachmentModel : NSObject<NIMCustomAttachment> @interface AttachmentModel : NSObject<NIMCustomAttachment>
@property (nonatomic,assign) int first; @property (nonatomic,assign) int first;
@property (nonatomic,assign) int second; @property (nonatomic,assign) int second;

View File

@@ -1,5 +1,5 @@
// //
// MessagePresenter.h // CHMessagePresenter.h
// mew-ios // mew-ios
// //
// Created by 触海 on 2023/11/16. // Created by 触海 on 2023/11/16.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface MessagePresenter : BaseMvpPresenter @interface CHMessagePresenter : BaseMvpPresenter
- (void)getChatLimitReceiverUid:(NSString *)receiverUid; - (void)getChatLimitReceiverUid:(NSString *)receiverUid;
/// 获取用户信息 /// 获取用户信息

View File

@@ -1,11 +1,11 @@
// //
// MessagePresenter.m // CHMessagePresenter.m
// mew-ios // mew-ios
// //
// Created by on 2023/11/16. // Created by on 2023/11/16.
// //
#import "MessagePresenter.h" #import "CHMessagePresenter.h"
#import "Api+Mine.h" #import "Api+Mine.h"
#import "Api+Message.h" #import "Api+Message.h"
//Model //Model
@@ -13,9 +13,9 @@
#import "AccountInfoStorage.h" #import "AccountInfoStorage.h"
#import "ChatLimitModel.h" #import "ChatLimitModel.h"
//Protocol //Protocol
#import "MessageProtocol.h" #import "CHMessageProtocol.h"
@implementation MessagePresenter @implementation CHMessagePresenter
- (void)getChatLimitReceiverUid:(NSString *)receiverUid { - (void)getChatLimitReceiverUid:(NSString *)receiverUid {
[Api getChatLimit:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [Api getChatLimit:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
ChatLimitModel *chatLimit = [ChatLimitModel modelWithJSON:data.data]; ChatLimitModel *chatLimit = [ChatLimitModel modelWithJSON:data.data];

View File

@@ -1,5 +1,5 @@
// //
// MessageProtocol.h // CHMessageProtocol.h
// mew-ios // mew-ios
// //
// Created by 触海 on 2023/11/16. // Created by 触海 on 2023/11/16.
@@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@protocol MessageProtocol <NSObject> @protocol CHMessageProtocol <NSObject>
- (void)onGetLimitChat:(ChatLimitModel *)chatLimit; - (void)onGetLimitChat:(ChatLimitModel *)chatLimit;
///获取用户信息成功 ///获取用户信息成功

View File

@@ -1,5 +1,5 @@
// //
// MessageAudioCenter.h // CHMessageAudioCenter.h
// xplan-ios // xplan-ios
// //
// Created by 冯硕 on 2022/4/22. // Created by 冯硕 on 2022/4/22.
@@ -9,10 +9,10 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class NIMMessage; @class NIMMessage;
@interface MessageAudioCenter : NSObject @interface CHMessageAudioCenter : NSObject
+ (instancetype)shareInstance; + (instancetype)shareInstance;
@property (nonatomic,strong, readonly) NIMMessage *currentPlayingMessage; @property (nonatomic,strong, readonly) NIMMessage *currentPlayingMessage;
- (void)play:(NIMMessage *)message; - (void)playAudioMessage:(NIMMessage *)message;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -1,25 +1,25 @@
// //
// MessageAudioCenter.m // CHMessageAudioCenter.m
// xplan-ios // xplan-ios
// //
// Created by on 2022/4/22. // Created by on 2022/4/22.
// //
#import "MessageAudioCenter.h" #import "CHMessageAudioCenter.h"
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@interface MessageAudioCenter ()<NIMMediaManagerDelegate> @interface CHMessageAudioCenter ()<NIMMediaManagerDelegate>
@property (nonatomic,assign) NSInteger retryCount; @property (nonatomic,assign) NSInteger retryCount;
@property (nonatomic,strong,nullable) NIMMessage *currentPlayingMessage; @property (nonatomic,strong,nullable) NIMMessage *currentPlayingMessage;
@end @end
@implementation MessageAudioCenter @implementation CHMessageAudioCenter
+ (instancetype)shareInstance { + (instancetype)shareInstance {
static MessageAudioCenter *instance; static CHMessageAudioCenter *instance;
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
instance = [[MessageAudioCenter alloc] init]; instance = [[CHMessageAudioCenter alloc] init];
}); });
return instance; return instance;
} }
@@ -37,7 +37,7 @@
_retryCount = 3; _retryCount = 3;
} }
- (void)play:(NIMMessage *)message { - (void)playAudioMessage:(NIMMessage *)message {
NIMAudioObject *audioObject = (NIMAudioObject *)message.messageObject; NIMAudioObject *audioObject = (NIMAudioObject *)message.messageObject;
if ([audioObject isKindOfClass:[NIMAudioObject class]]) { if ([audioObject isKindOfClass:[NIMAudioObject class]]) {
self.currentPlayingMessage = message; self.currentPlayingMessage = message;

View File

@@ -0,0 +1,17 @@
//
// CHMessageConentAudioView.h
// xplan-ios
//
// Created by 冯硕 on 2022/4/22.
//
#import <UIKit/UIKit.h>
#import "CHMessageContentProtocol.h"
NS_ASSUME_NONNULL_BEGIN
@interface CHMessageConentAudioView : UIView<CHMessageContentProtocol>
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,18 +1,18 @@
// //
// MessageConentAudioView.m // CHMessageConentAudioView.m
// xplan-ios // xplan-ios
// //
// Created by on 2022/4/22. // Created by on 2022/4/22.
// //
#import "MessageConentAudioView.h" #import "CHMessageConentAudioView.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
///Tool ///Tool
#import "ThemeColor.h" #import "ThemeColor.h"
#import "MessageAudioCenter.h" #import "CHMessageAudioCenter.h"
@interface MessageConentAudioView ()<NIMMediaManagerDelegate> @interface CHMessageConentAudioView ()<NIMMediaManagerDelegate>
/// ///
@property (nonatomic,strong) UIView * backView; @property (nonatomic,strong) UIView * backView;
/// ///
@@ -25,7 +25,7 @@
@property (nonatomic,assign) BOOL isPlaying; @property (nonatomic,assign) BOOL isPlaying;
@end @end
@implementation MessageConentAudioView @implementation CHMessageConentAudioView
- (void)dealloc { - (void)dealloc {
[[NIMSDK sharedSDK].mediaManager removeDelegate:self]; [[NIMSDK sharedSDK].mediaManager removeDelegate:self];
@@ -70,7 +70,7 @@
#pragma mark - NIMMediaManagerDelegate #pragma mark - NIMMediaManagerDelegate
- (void)playAudio:(NSString *)filePath didBeganWithError:(NSError *)error { - (void)playAudio:(NSString *)filePath didBeganWithError:(NSError *)error {
if(filePath && !error) { if(filePath && !error) {
if ([MessageAudioCenter shareInstance].currentPlayingMessage == self.message) { if ([CHMessageAudioCenter shareInstance].currentPlayingMessage == self.message) {
[self.audioImageView startAnimating]; [self.audioImageView startAnimating];
} }
} }
@@ -94,7 +94,7 @@
} else { } else {
self.isPlaying = YES; self.isPlaying = YES;
[[NIMSDK sharedSDK].mediaManager switchAudioOutputDevice:NIMAudioOutputDeviceSpeaker]; [[NIMSDK sharedSDK].mediaManager switchAudioOutputDevice:NIMAudioOutputDeviceSpeaker];
[[MessageAudioCenter shareInstance] play:self.message]; [[CHMessageAudioCenter shareInstance] playAudioMessage:self.message];
} }
} }
} }

View File

@@ -1,5 +1,5 @@
// //
// SessionAudioRecordView.h // CHSessionAudioRecordView.h
// xplan-ios // xplan-ios
// //
// Created by 冯硕 on 2022/4/21. // Created by 冯硕 on 2022/4/21.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface SessionAudioRecordView : UIView @interface CHSessionAudioRecordView : UIView
- (void)configAudioRecord:(NSString *)imageName title:(NSString *)title isAnimation:(BOOL)isAnimation; - (void)configAudioRecord:(NSString *)imageName title:(NSString *)title isAnimation:(BOOL)isAnimation;
///开始录音 ///开始录音

View File

@@ -1,16 +1,16 @@
// //
// SessionAudioRecordView.m // CHSessionAudioRecordView.m
// xplan-ios // xplan-ios
// //
// Created by on 2022/4/21. // Created by on 2022/4/21.
// //
#import "SessionAudioRecordView.h" #import "CHSessionAudioRecordView.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@interface SessionAudioRecordView () @interface CHSessionAudioRecordView ()
/// ///
@property (nonatomic,strong) UIView * backView; @property (nonatomic,strong) UIView * backView;
/// ///
@@ -21,7 +21,7 @@
@property (nonatomic,strong) UILabel *timeLabel; @property (nonatomic,strong) UILabel *timeLabel;
@end @end
@implementation SessionAudioRecordView @implementation CHSessionAudioRecordView
- (instancetype)initWithFrame:(CGRect)frame { - (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];

View File

@@ -1,5 +1,5 @@
// //
// SessionInfoViewController.h // CHSessionInfoViewController.h
// xplan-ios // xplan-ios
// //
// Created by 冯硕 on 2022/4/25. // Created by 冯硕 on 2022/4/25.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface SessionInfoViewController : BaseViewController @interface CHSessionInfoViewController : BaseViewController
///用户的id ///用户的id
@property (nonatomic,copy) NSString *userId; @property (nonatomic,copy) NSString *userId;
@end @end

View File

@@ -1,11 +1,11 @@
// //
// SessionInfoViewController.m // CHSessionInfoViewController.m
// xplan-ios // xplan-ios
// //
// Created by on 2022/4/25. // Created by on 2022/4/25.
// //
#import "SessionInfoViewController.h" #import "CHSessionInfoViewController.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@@ -18,7 +18,7 @@
#import "YMWebViewController.h" #import "YMWebViewController.h"
@interface SessionInfoViewController () @interface CHSessionInfoViewController ()
/// ///
@property (nonatomic,strong) UIStackView *stackView; @property (nonatomic,strong) UIStackView *stackView;
///view ///view
@@ -42,7 +42,7 @@
@end @end
@implementation SessionInfoViewController @implementation CHSessionInfoViewController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];

View File

@@ -0,0 +1,30 @@
//
// CHSessionMessageCell.h
// mew-ios
//
// Created by 触海 on 2023/11/16.
//
#import <UIKit/UIKit.h>
@class NIMMessage;
NS_ASSUME_NONNULL_BEGIN
@protocol CHSessionMessageCellDelegate <NSObject>
- (void)didTapAvatarWithUid:(NSString *)uid;
///发送失败点击了重试
- (void)didFailRetryMessage:(NIMMessage *)message;
@end
@interface CHSessionMessageCell : UITableViewCell
+ (CGFloat)measureHeight:(NIMMessage *)message;
- (void)renderWithMessage:(NIMMessage *)message;
+ (NSString *)cellContent:(NIMMessage *)message;
@property (nonatomic,weak) id<CHSessionMessageCellDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,28 +1,30 @@
// //
// SessionMessageCell.m // CHSessionMessageCell.m
// mew-ios // mew-ios
// //
// Created by on 2023/11/16. // Created by on 2023/11/16.
// //
#import "SessionMessageCell.h" #import "CHSessionMessageCell.h"
/// View /// View
#import "NetImageView.h" #import "NetImageView.h"
#import "MessageContentUnSupportView.h" #import "CHMessageContentUnSupportView.h"
#import "MessageContentText.h" #import "CHMessageContentText.h"
#import "MessageContentImage.h" #import "CHMessageContentImage.h"
#import "CHMessageConentAudioView.h"
///Tool ///Tool
#import "ThemeColor.h" #import "ThemeColor.h"
#import "YMMacro.h" #import "YMMacro.h"
#import "NewEncryptTool.h"
/// Third /// Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
/// P /// P
#import "MessageContentProtocol.h" #import "CHMessageContentProtocol.h"
///Model ///Model
//#import "AttachmentModel.h" //#import "AttachmentModel.h"
@interface SessionMessageCell() @interface CHSessionMessageCell()
/** */ /** */
@property (nonatomic, strong) NetImageView * leftAvatar; @property (nonatomic, strong) NetImageView * leftAvatar;
@@ -37,13 +39,13 @@
@property (nonatomic, strong) MASConstraint * messageBackgroundRight; @property (nonatomic, strong) MASConstraint * messageBackgroundRight;
/** */ /** */
@property (nonatomic, strong) UIView<MessageContentProtocol> * messageContent; @property (nonatomic, strong) UIView<CHMessageContentProtocol> * messageContent;
/// ///
@property (nonatomic,strong) NIMMessage *currentMessage; @property (nonatomic,strong) NIMMessage *currentMessage;
@end @end
@implementation SessionMessageCell @implementation CHSessionMessageCell
#pragma mark - Public Method #pragma mark - Public Method
+ (CGFloat)measureHeight:(NIMMessage *)message { + (CGFloat)measureHeight:(NIMMessage *)message {
@@ -56,12 +58,13 @@
switch (message.messageType) { switch (message.messageType) {
case NIMMessageTypeText: case NIMMessageTypeText:
case NIMMessageTypeTip: case NIMMessageTypeTip:
measureHeight = [MessageContentText measureHeight:message]; measureHeight = [CHMessageContentText measureHeight:message];
break; break;
case NIMMessageTypeImage: case NIMMessageTypeImage:
measureHeight = [MessageContentImage measureHeight:message]; measureHeight = [CHMessageContentImage measureHeight:message];
break; break;
case NIMMessageTypeAudio: case NIMMessageTypeAudio:
measureHeight = [CHMessageConentAudioView measureHeight:message];
break; break;
case NIMMessageTypeCustom: case NIMMessageTypeCustom:
measureHeight = [self customMessageMeasureHeight:message]; measureHeight = [self customMessageMeasureHeight:message];
@@ -84,13 +87,13 @@
self.rightAvatar.hidden = NO; self.rightAvatar.hidden = NO;
[self.messageBackgroundLeft uninstall]; [self.messageBackgroundLeft uninstall];
[self.messageBackgroundRight install]; [self.messageBackgroundRight install];
self.rightAvatar.imageUrl = avatarUrl; self.rightAvatar.imageUrl = (avatarUrl == nil ||avatarUrl.length == 0) ? [NewEncryptTool MEW_aesDecrypt:@"xdPnNelVD/RTlTKFqgSrESDPcNF6Diqb8sLg+HEvxpvjDdTLom1euQUOAOppjx15"] : avatarUrl;;
} else { } else {
self.leftAvatar.hidden = NO; self.leftAvatar.hidden = NO;
self.rightAvatar.hidden = YES; self.rightAvatar.hidden = YES;
[self.messageBackgroundLeft install]; [self.messageBackgroundLeft install];
[self.messageBackgroundRight uninstall]; [self.messageBackgroundRight uninstall];
self.leftAvatar.imageUrl = avatarUrl; self.leftAvatar.imageUrl = (avatarUrl == nil ||avatarUrl.length == 0) ? [NewEncryptTool MEW_aesDecrypt:@"xdPnNelVD/RTlTKFqgSrESDPcNF6Diqb8sLg+HEvxpvjDdTLom1euQUOAOppjx15"] : avatarUrl;;
} }
[self handleMessageFail:message]; [self handleMessageFail:message];
@@ -106,23 +109,26 @@
switch (message.messageType) { switch (message.messageType) {
case NIMMessageTypeText: case NIMMessageTypeText:
case NIMMessageTypeTip: case NIMMessageTypeTip:
if (![self.messageContent isKindOfClass:[MessageContentText class]]) { if (![self.messageContent isKindOfClass:[CHMessageContentText class]]) {
self.messageContent = [[MessageContentText alloc] init]; self.messageContent = [[CHMessageContentText alloc] init];
} }
break; break;
case NIMMessageTypeImage: case NIMMessageTypeImage:
if (![self.messageContent isKindOfClass:[MessageContentImage class]]) { if (![self.messageContent isKindOfClass:[CHMessageContentImage class]]) {
self.messageContent = [[MessageContentImage alloc] init]; self.messageContent = [[CHMessageContentImage alloc] init];
} }
break; break;
case NIMMessageTypeAudio: case NIMMessageTypeAudio:
if (![self.messageContent isKindOfClass:[CHMessageConentAudioView class]]) {
self.messageContent = [[CHMessageConentAudioView alloc] init];
}
break; break;
case NIMMessageTypeCustom: case NIMMessageTypeCustom:
self.messageContent = [self getCustomMessageContentView:message]; self.messageContent = [self getCustomMessageContentView:message];
break; break;
default: default:
if (![self.messageContent isKindOfClass:[MessageContentUnSupportView class]]) { if (![self.messageContent isKindOfClass:[CHMessageContentUnSupportView class]]) {
self.messageContent = [[MessageContentUnSupportView alloc] init]; self.messageContent = [[CHMessageContentUnSupportView alloc] init];
} }
break; break;
} }
@@ -137,15 +143,15 @@
+ (NSString *)cellContent:(NIMMessage *)message { + (NSString *)cellContent:(NIMMessage *)message {
if (message.messageType == NIMMessageTypeText || message.messageType == NIMMessageTypeTip) { if (message.messageType == NIMMessageTypeText || message.messageType == NIMMessageTypeTip) {
return @"MessageContentText"; return @"CHMessageContentText";
} else if(message.messageType == NIMMessageTypeImage) { } else if(message.messageType == NIMMessageTypeImage) {
return @"MessageContentImage"; return @"CHMessageContentImage";
}else if(message.messageType == NIMMessageTypeAudio) { }else if(message.messageType == NIMMessageTypeAudio) {
return @"MessageConentAudioView"; return @"CHMessageConentAudioView";
} else if(message.messageType == NIMMessageTypeCustom) { } else if(message.messageType == NIMMessageTypeCustom) {
return @"MessageContentUnSupportView"; return @"CHMessageContentUnSupportView";
} else { } else {
return @"MessageContentUnSupportView"; return @"CHMessageContentUnSupportView";
} }
} }
@@ -155,21 +161,21 @@
// //
- (void)rightAvatarTapRecognizer { - (void)rightAvatarTapRecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(didTapAvatar:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didTapAvatar:)]) {
[self.delegate didTapAvatar:self.currentMessage.from]; [self.delegate didTapAvatarWithUid:self.currentMessage.from];
} }
} }
// //
- (void)leftAvatarTapRecognizer { - (void)leftAvatarTapRecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(didTapAvatar:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didTapAvatar:)]) {
[self.delegate didTapAvatar:self.currentMessage.from]; [self.delegate didTapAvatarWithUid:self.currentMessage.from];
} }
} }
// //
- (void)failButtonAction:(UIButton *)sender { - (void)failButtonAction:(UIButton *)sender {
if (self.delegate && [self.delegate respondsToSelector:@selector(didFailRetry:)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(didFailRetry:)]) {
[self.delegate didFailRetry:self.currentMessage]; [self.delegate didFailRetryMessage:self.currentMessage];
} }
} }
@@ -177,14 +183,14 @@
/// ///
+ (CGFloat)customMessageMeasureHeight:(NIMMessage *)message { + (CGFloat)customMessageMeasureHeight:(NIMMessage *)message {
// //
return [MessageContentUnSupportView measureHeight:message]; return [CHMessageContentUnSupportView measureHeight:message];
} }
- (UIView<MessageContentProtocol> *)getCustomMessageContentView:(NIMMessage *)message { - (UIView<CHMessageContentProtocol> *)getCustomMessageContentView:(NIMMessage *)message {
if ([self.messageContent isKindOfClass:[MessageContentUnSupportView class]]) { if ([self.messageContent isKindOfClass:[CHMessageContentUnSupportView class]]) {
return self.messageContent; return self.messageContent;
} }
return [[MessageContentUnSupportView alloc] init]; return [[CHMessageContentUnSupportView alloc] init];
} }
/// ///
@@ -223,13 +229,6 @@
/// ///
- (BOOL)messageShowAvatar:(NIMMessage *)message { - (BOOL)messageShowAvatar:(NIMMessage *)message {
// if (message.messageType == NIMMessageTypeCustom) {
// NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
// AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
// if (attachment.first == CustomMessageType_Chat_Risk_Alert) {
// return YES;
// }
// }
return NO; return NO;
} }

View File

@@ -0,0 +1,33 @@
//
// CHSessionNavView.h
// mew-ios
//
// Created by 触海 on 2023/11/16.
//
#import <UIKit/UIKit.h>
@class CHSessionNavView;
NS_ASSUME_NONNULL_BEGIN
@protocol CHSessionNavViewDelegate <NSObject>
///点击了举报
- (void)sessionNavView:(CHSessionNavView *)view didClickReport:(UIButton *)sender;
///点击了关注
- (void)sessionNavView:(CHSessionNavView *)view didClickLike:(UIButton *)sender;
///点击了返回
- (void)sessionNavView:(CHSessionNavView *)view didClickBack:(UIButton *)sender;
@end
@interface CHSessionNavView : UIView
@property (nonatomic,copy) NSString *userId;
///标题
@property (nonatomic,copy) NSString *title;
///是否已经关注了
@property (nonatomic,assign) BOOL isLike;
///代理
@property (nonatomic,weak) id<CHSessionNavViewDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,11 +1,11 @@
// //
// SessionNavView.m // CHSessionNavView.m
// mew-ios // mew-ios
// //
// Created by on 2023/11/16. // Created by on 2023/11/16.
// //
#import "SessionNavView.h" #import "CHSessionNavView.h"
/// Tool /// Tool
#import "ThemeColor.h" #import "ThemeColor.h"
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@@ -13,7 +13,7 @@
/// Third /// Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
@interface SessionNavView () @interface CHSessionNavView ()
/// ///
@property (nonatomic,strong) UIButton *backButton; @property (nonatomic,strong) UIButton *backButton;
/// ///
@@ -25,7 +25,7 @@
@property (nonatomic,strong) UIButton *reportButton; @property (nonatomic,strong) UIButton *reportButton;
@end @end
@implementation SessionNavView @implementation CHSessionNavView
#pragma mark - Init #pragma mark - Init
- (instancetype)initWithFrame:(CGRect)frame { - (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];
@@ -147,9 +147,9 @@
_likeButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium]; _likeButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
_likeButton.layer.cornerRadius = 21/2; _likeButton.layer.cornerRadius = 21/2;
_likeButton.layer.masksToBounds = YES; _likeButton.layer.masksToBounds = YES;
[_likeButton setTitleColor:UIColorFromRGB(0xFFDA24) forState:UIControlStateNormal]; [_likeButton setTitleColor:UIColorFromRGB(0x9552FF) forState:UIControlStateNormal];
_likeButton.layer.borderWidth = 0.5; _likeButton.layer.borderWidth = 0.5;
_likeButton.layer.borderColor = UIColorFromRGB(0xFFDA24).CGColor; _likeButton.layer.borderColor = UIColorFromRGB(0x9552FF).CGColor;
[_likeButton addTarget:self action:@selector(likeButtonAction:) forControlEvents:UIControlEventTouchUpInside]; [_likeButton addTarget:self action:@selector(likeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
_likeButton.hidden = NO; _likeButton.hidden = NO;
} }

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class MessageMenuModel; @class MessageMenuModel;
@protocol SessionToolbarViewDelegate <NSObject> @protocol CHSessionToolbarViewDelegate <NSObject>
- (void)keyboardWillChangeFrame:(CGRect)rect; - (void)keyboardWillChangeFrame:(CGRect)rect;
- (void)sendTextMessage:(NSString *)text; - (void)sendTextMessage:(NSString *)text;
@@ -17,13 +17,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)didSelectMenuItem:(MessageMenuModel *)info; - (void)didSelectMenuItem:(MessageMenuModel *)info;
@end @end
@interface SessionToolbarView : UIView @interface CHSessionToolbarView : UIView
///代理 ///代理
@property (nonatomic,weak) id<SessionToolbarViewDelegate> delegate; @property (nonatomic,weak) id<CHSessionToolbarViewDelegate> delegate;
@property(nonatomic,assign) int model; @property(nonatomic,assign) int model;
@property (nonatomic, assign, getter=isSendDisabled) BOOL sendDisabled; @property (nonatomic, assign, getter=isSendDisabled) BOOL sendDisabled;
///折叠 菜单view ///折叠 菜单view
- (void)foldMenuView; - (void)foldToolMenuView;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -5,7 +5,7 @@
// Created by on 2022/4/20. // Created by on 2022/4/20.
// //
#import "SessionToolbarView.h" #import "CHSessionToolbarView.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@@ -16,13 +16,13 @@
///Model ///Model
#import "MessageMenuModel.h" #import "MessageMenuModel.h"
///View ///View
#import "MessageToolMenuCollectionViewCell.h" #import "CHMessageToolMenuCollectionViewCell.h"
#import "SessionAudioRecordView.h" #import "CHSessionAudioRecordView.h"
#define TOOL_HEIGHT 60 #define TOOL_HEIGHT 60
#define MENU_HEIGHT 130 #define MENU_HEIGHT 130
@interface SessionToolbarView ()<UICollectionViewDelegate, UICollectionViewDataSource, UITextFieldDelegate, NIMMediaManagerDelegate> @interface CHSessionToolbarView ()<UICollectionViewDelegate, UICollectionViewDataSource, UITextFieldDelegate, NIMMediaManagerDelegate>
/// ///
@property (nonatomic,strong) UIStackView *stackView; @property (nonatomic,strong) UIStackView *stackView;
/// ///
@@ -46,10 +46,10 @@
/// ///
@property (nonatomic,strong) NSArray<MessageMenuModel *> *menuList; @property (nonatomic,strong) NSArray<MessageMenuModel *> *menuList;
///view ///view
@property (nonatomic,strong) SessionAudioRecordView *audioRecordView; @property (nonatomic,strong) CHSessionAudioRecordView *audioRecordView;
@end @end
@implementation SessionToolbarView @implementation CHSessionToolbarView
- (void)dealloc { - (void)dealloc {
[[NIMSDK sharedSDK].mediaManager removeDelegate:self]; [[NIMSDK sharedSDK].mediaManager removeDelegate:self];
@@ -67,7 +67,7 @@
return self; return self;
} }
#pragma mark - Public Method #pragma mark - Public Method
- (void)foldMenuView { - (void)foldToolMenuView {
[self.inputView resignFirstResponder]; [self.inputView resignFirstResponder];
if (self.collectionView.hidden == NO) { if (self.collectionView.hidden == NO) {
self.collectionView.hidden = YES; self.collectionView.hidden = YES;
@@ -154,7 +154,7 @@
} }
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
MessageToolMenuCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MessageToolMenuCollectionViewCell class]) forIndexPath:indexPath]; CHMessageToolMenuCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([CHMessageToolMenuCollectionViewCell class]) forIndexPath:indexPath];
MessageMenuModel * model = [self.menuList safeObjectAtIndex1:indexPath.row]; MessageMenuModel * model = [self.menuList safeObjectAtIndex1:indexPath.row];
cell.imageName = model.imageName; cell.imageName = model.imageName;
return cell; return cell;
@@ -445,7 +445,7 @@
_collectionView.delegate = self; _collectionView.delegate = self;
_collectionView.backgroundColor = [UIColor clearColor]; _collectionView.backgroundColor = [UIColor clearColor];
_collectionView.hidden = YES; _collectionView.hidden = YES;
[_collectionView registerClass:[MessageToolMenuCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([MessageToolMenuCollectionViewCell class])]; [_collectionView registerClass:[CHMessageToolMenuCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([CHMessageToolMenuCollectionViewCell class])];
} }
return _collectionView; return _collectionView;
} }
@@ -471,9 +471,9 @@
return _menuList; return _menuList;
} }
- (SessionAudioRecordView *)audioRecordView { - (CHSessionAudioRecordView *)audioRecordView {
if (!_audioRecordView) { if (!_audioRecordView) {
_audioRecordView = [[SessionAudioRecordView alloc] init]; _audioRecordView = [[CHSessionAudioRecordView alloc] init];
} }
return _audioRecordView; return _audioRecordView;
} }

View File

@@ -1,16 +1,16 @@
// //
// MessageContentImage.h // CHMessageContentImage.h
// mew-ios // mew-ios
// //
// Created by 触海 on 2023/11/16. // Created by 触海 on 2023/11/16.
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "MessageContentProtocol.h" #import "CHMessageContentProtocol.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface MessageContentImage : UIView<MessageContentProtocol> @interface CHMessageContentImage : UIView<CHMessageContentProtocol>
@end @end

View File

@@ -1,11 +1,11 @@
// //
// MessageContentImage.m // CHMessageContentImage.m
// mew-ios // mew-ios
// //
// Created by on 2023/11/16. // Created by on 2023/11/16.
// //
#import "MessageContentImage.h" #import "CHMessageContentImage.h"
#import "NetImageView.h" #import "NetImageView.h"
//#import "SDPhotoBrowser.h" //#import "SDPhotoBrowser.h"
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@@ -14,7 +14,7 @@
#define MESSAGE_IMAGE_MAX_SIZE (CONTENT_WIDTH_MAX) #define MESSAGE_IMAGE_MAX_SIZE (CONTENT_WIDTH_MAX)
#define MESSAGE_IMAGE_Min_SIZE (CONTENT_WIDTH_MAX -100) #define MESSAGE_IMAGE_Min_SIZE (CONTENT_WIDTH_MAX -100)
@interface MessageContentImage() @interface CHMessageContentImage()
//<SDPhotoBrowserDelegate> //<SDPhotoBrowserDelegate>
@property (nonatomic, strong) NetImageView * messageImage; @property (nonatomic, strong) NetImageView * messageImage;
@@ -22,7 +22,7 @@
@end @end
@implementation MessageContentImage @implementation CHMessageContentImage
- (instancetype)init { - (instancetype)init {
self = [super init]; self = [super init];
@@ -87,22 +87,7 @@
} }
#pragma mark - SDPhotoBrowserDelegate #pragma mark - SDPhotoBrowserDelegate
//- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index {
// return [NSURL URLWithString:self.imageObject.url];
//}
//
//- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index {
// return [UIImageConstant defalutBannerPlaceholder];
//}
//
- (void)didTapImage { - (void)didTapImage {
// SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init];
// browser.sourceImagesContainerView = self;
// browser.delegate = self;
// browser.imageCount = 1;
// browser.currentImageIndex = 0;
// browser.isMe = NO;
// [browser show];
} }

View File

@@ -1,5 +1,5 @@
// //
// MessageContentProtocol.h // CHMessageContentProtocol.h
// mew-ios // mew-ios
// //
// Created by 触海 on 2023/11/16. // Created by 触海 on 2023/11/16.
@@ -17,7 +17,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@protocol MessageContentProtocol <NSObject> @protocol CHMessageContentProtocol <NSObject>
+ (CGFloat)measureHeight:(NIMMessage *)message; + (CGFloat)measureHeight:(NIMMessage *)message;
- (void)render:(NIMMessage *)message; - (void)render:(NIMMessage *)message;

View File

@@ -1,16 +1,16 @@
// //
// MessageContentText.h // CHMessageContentText.h
// mew-ios // mew-ios
// //
// Created by 触海 on 2023/11/16. // Created by 触海 on 2023/11/16.
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "MessageContentProtocol.h" #import "CHMessageContentProtocol.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface MessageContentText : UIView<MessageContentProtocol> @interface CHMessageContentText : UIView<CHMessageContentProtocol>
@end @end

View File

@@ -1,11 +1,11 @@
// //
// MessageContentText.m // CHMessageContentText.m
// mew-ios // mew-ios
// //
// Created by on 2023/11/16. // Created by on 2023/11/16.
// //
#import "MessageContentText.h" #import "CHMessageContentText.h"
#import "ThemeColor.h" #import "ThemeColor.h"
#import "NSObject+MJExtension.h" #import "NSObject+MJExtension.h"
@@ -14,7 +14,7 @@
#define MESSAGE_TEXT_PADDING 10 #define MESSAGE_TEXT_PADDING 10
@interface MessageContentText() @interface CHMessageContentText()
/** /**
@@ -23,7 +23,7 @@
@end @end
@implementation MessageContentText @implementation CHMessageContentText
+ (CGFloat)measureHeight:(NIMMessage *)message { + (CGFloat)measureHeight:(NIMMessage *)message {
NSString * messageText = message.text; NSString * messageText = message.text;
@@ -33,7 +33,7 @@
CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2, MAXFLOAT); CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2, MAXFLOAT);
CGFloat msgHeight = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[MessageContentText messageTextAttibutes] context:nil].size.height; CGFloat msgHeight = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[CHMessageContentText messageTextAttibutes] context:nil].size.height;
return msgHeight + MESSAGE_TEXT_PADDING * 2 + CONTENT_PADDING_V_TOTAL; return msgHeight + MESSAGE_TEXT_PADDING * 2 + CONTENT_PADDING_V_TOTAL;
} }
@@ -64,7 +64,7 @@
if (!messageText || (message.messageType != NIMMessageTypeTip && message.messageType != NIMMessageTypeText)) { if (!messageText || (message.messageType != NIMMessageTypeTip && message.messageType != NIMMessageTypeText)) {
messageText = @"未知消息类型"; messageText = @"未知消息类型";
} }
_messageText.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[MessageContentText messageTextAttibutes]]; _messageText.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[CHMessageContentText messageTextAttibutes]];
} }
- (UILabel *)messageText { - (UILabel *)messageText {

View File

@@ -0,0 +1,17 @@
//
// CHMessageContentUnSupportView.h
// mew-ios
//
// Created by 触海 on 2023/11/16.
//
#import <UIKit/UIKit.h>
#import "CHMessageContentProtocol.h"
NS_ASSUME_NONNULL_BEGIN
@interface CHMessageContentUnSupportView : UIView<CHMessageContentProtocol>
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,12 +1,12 @@
// //
// MessageContentUnSupportView.m // CHMessageContentUnSupportView.m
// mew-ios // mew-ios
// //
// Created by on 2023/11/16. // Created by on 2023/11/16.
// //
#import "MessageContentUnSupportView.h" #import "CHMessageContentUnSupportView.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@@ -15,12 +15,12 @@
#define MESSAGE_TEXT_PADDING 10 #define MESSAGE_TEXT_PADDING 10
@interface MessageContentUnSupportView () @interface CHMessageContentUnSupportView ()
/// ///
@property (nonatomic,strong) UILabel *unSupportLabel; @property (nonatomic,strong) UILabel *unSupportLabel;
@end @end
@implementation MessageContentUnSupportView @implementation CHMessageContentUnSupportView
+ (CGFloat)measureHeight:(NIMMessage *)message { + (CGFloat)measureHeight:(NIMMessage *)message {
NSString * messageText = @"暂不支持此种类型消息"; NSString * messageText = @"暂不支持此种类型消息";

View File

@@ -1,5 +1,5 @@
// //
// MessageToolMenuCollectionViewCell.h // CHMessageToolMenuCollectionViewCell.h
// xplan-ios // xplan-ios
// //
// Created by 冯硕 on 2022/4/20. // Created by 冯硕 on 2022/4/20.
@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface MessageToolMenuCollectionViewCell : UICollectionViewCell @interface CHMessageToolMenuCollectionViewCell : UICollectionViewCell
@property (nonatomic,copy) NSString *imageName; @property (nonatomic,copy) NSString *imageName;
@end @end

View File

@@ -1,21 +1,21 @@
// //
// MessageToolMenuCollectionViewCell.m // CHMessageToolMenuCollectionViewCell.m
// xplan-ios // xplan-ios
// //
// Created by on 2022/4/20. // Created by on 2022/4/20.
// //
#import "MessageToolMenuCollectionViewCell.h" #import "CHMessageToolMenuCollectionViewCell.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
@interface MessageToolMenuCollectionViewCell () @interface CHMessageToolMenuCollectionViewCell ()
@property (nonatomic,strong) UIImageView *logoImageView; @property (nonatomic,strong) UIImageView *logoImageView;
@end @end
@implementation MessageToolMenuCollectionViewCell @implementation CHMessageToolMenuCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame { - (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];

View File

@@ -1,17 +0,0 @@
//
// MessageContentUnSupportView.h
// mew-ios
//
// Created by 触海 on 2023/11/16.
//
#import <UIKit/UIKit.h>
#import "MessageContentProtocol.h"
NS_ASSUME_NONNULL_BEGIN
@interface MessageContentUnSupportView : UIView<MessageContentProtocol>
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,16 +0,0 @@
//
// MessageConentAudioView.h
// xplan-ios
//
// Created by 冯硕 on 2022/4/22.
//
#import <UIKit/UIKit.h>
#import "MessageContentProtocol.h"
NS_ASSUME_NONNULL_BEGIN
@interface MessageConentAudioView : UIView<MessageContentProtocol>
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,32 +0,0 @@
//
// SessionMessageCell.h
// mew-ios
//
// Created by 触海 on 2023/11/16.
//
#import <UIKit/UIKit.h>
@class NIMMessage;
NS_ASSUME_NONNULL_BEGIN
@protocol SessionMessageCellDelegate <NSObject>
///更新消息成功
//- (void)updateMessageSuccess:(NIMMessage *)message;
- (void)didTapAvatar:(NSString *)uid;
///发送失败点击了重试
- (void)didFailRetry:(NIMMessage *)message;
@end
@interface SessionMessageCell : UITableViewCell
+ (CGFloat)measureHeight:(NIMMessage *)message;
- (void)renderWithMessage:(NIMMessage *)message;
+ (NSString *)cellContent:(NIMMessage *)message;
@property (nonatomic,weak) id<SessionMessageCellDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,33 +0,0 @@
//
// SessionNavView.h
// mew-ios
//
// Created by 触海 on 2023/11/16.
//
#import <UIKit/UIKit.h>
@class SessionNavView;
NS_ASSUME_NONNULL_BEGIN
@protocol SessionNavViewDelegate <NSObject>
///点击了举报
- (void)sessionNavView:(SessionNavView *)view didClickReport:(UIButton *)sender;
///点击了关注
- (void)sessionNavView:(SessionNavView *)view didClickLike:(UIButton *)sender;
///点击了返回
- (void)sessionNavView:(SessionNavView *)view didClickBack:(UIButton *)sender;
@end
@interface SessionNavView : UIView
@property (nonatomic,copy) NSString *userId;
///标题
@property (nonatomic,copy) NSString *title;
///是否已经关注了
@property (nonatomic,assign) BOOL isLike;
///代理
@property (nonatomic,weak) id<SessionNavViewDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -7,8 +7,8 @@
#import "SessionViewController.h" #import "SessionViewController.h"
/// View /// View
#import "SessionNavView.h" #import "CHSessionNavView.h"
#import "SessionMessageCell.h" #import "CHSessionMessageCell.h"
/// Tool /// Tool
#import "YMMacro.h" #import "YMMacro.h"
#import "ThemeColor.h" #import "ThemeColor.h"
@@ -22,26 +22,26 @@
#import <MJRefresh/MJRefresh.h> #import <MJRefresh/MJRefresh.h>
#import <IQKeyboardManager/IQKeyboardManager.h> #import <IQKeyboardManager/IQKeyboardManager.h>
/// Presenter /// Presenter
#import "MessagePresenter.h" #import "CHMessagePresenter.h"
#import "MessageProtocol.h" #import "CHMessageProtocol.h"
#import <TZImagePickerController/TZImagePickerController.h> #import <TZImagePickerController/TZImagePickerController.h>
/// Model /// Model
#import "ChatLimitModel.h" #import "ChatLimitModel.h"
#import "UserInfoModel.h" #import "UserInfoModel.h"
#import "SessionInfoViewController.h" #import "CHSessionInfoViewController.h"
#import "SessionToolbarView.h" #import "CHSessionToolbarView.h"
#import "NIMMessageMaker.h" #import "NIMMessageMaker.h"
#import "MessageMenuModel.h" #import "MessageMenuModel.h"
@interface SessionViewController ()<SessionToolbarViewDelegate,SessionNavViewDelegate,SessionMessageCellDelegate,MessageProtocol, @interface SessionViewController ()<CHSessionToolbarViewDelegate,CHSessionNavViewDelegate,CHSessionMessageCellDelegate,CHMessageProtocol,
UITableViewDelegate, UITableViewDataSource, UITableViewDelegate, UITableViewDataSource,
NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate,TZImagePickerControllerDelegate> NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate,TZImagePickerControllerDelegate>
/// ///
@property (nonatomic,strong) SessionNavView *sessionNavView; @property (nonatomic,strong) CHSessionNavView *sessionNavView;
/// ///
@property (nonatomic, strong) UITableView * sessionTableView; @property (nonatomic, strong) UITableView * sessionTableView;
/// ///
@property (nonatomic,strong) SessionToolbarView *toolbarView; @property (nonatomic,strong) CHSessionToolbarView *toolbarView;
// //
@property (nonatomic, strong) NIMSession * session; @property (nonatomic, strong) NIMSession * session;
@@ -58,8 +58,8 @@
- (BOOL)isHiddenNavBar { - (BOOL)isHiddenNavBar {
return YES; return YES;
} }
- (MessagePresenter *)createPresenter { - (CHMessagePresenter *)createPresenter {
return [[MessagePresenter alloc] init]; return [[CHMessagePresenter alloc] init];
} }
#pragma mark - Life Cycle #pragma mark - Life Cycle
- (void)viewDidLoad { - (void)viewDidLoad {
@@ -98,26 +98,26 @@
} }
#pragma mark - SessionNavViewDelegate () #pragma mark - CHSessionNavViewDelegate ()
- (void)sessionNavView:(SessionNavView *)view didClickBack:(UIButton *)sender { - (void)sessionNavView:(CHSessionNavView *)view didClickBack:(UIButton *)sender {
[self.navigationController popViewControllerAnimated:NO]; [self.navigationController popViewControllerAnimated:NO];
} }
// //
- (void)sessionNavView:(SessionNavView *)view didClickLike:(UIButton *)sender { - (void)CHSessionNavView:(CHSessionNavView *)view didClickLike:(UIButton *)sender {
[self.presenter attentionUser:self.session.sessionId]; [self.presenter attentionUser:self.session.sessionId];
} }
// //
- (void)sessionNavView:(SessionNavView *)view didClickReport:(UIButton *)sender { - (void)CHSessionNavView:(CHSessionNavView *)view didClickReport:(UIButton *)sender {
SessionInfoViewController * reportVC = [[SessionInfoViewController alloc] init]; CHSessionInfoViewController * reportVC = [[CHSessionInfoViewController alloc] init];
reportVC.userId = self.session.sessionId; reportVC.userId = self.session.sessionId;
[self.navigationController pushViewController:reportVC animated:YES]; [self.navigationController pushViewController:reportVC animated:YES];
} }
#pragma mark - SessionMessageCellDelegate(cell) #pragma mark - CHSessionMessageCellDelegate(cell)
// cell // cell
- (void)didTapAvatar:(NSString *)uid { - (void)didTapAvatarWithUid:(NSString *)uid {
if ([[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:self.session.sessionId] if ([[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:self.session.sessionId]
|| [[ClientConfig shareConfig].configInfo.officialAccountUids containsObject:self.session.sessionId]) { || [[ClientConfig shareConfig].configInfo.officialAccountUids containsObject:self.session.sessionId]) {
// //
@@ -130,7 +130,7 @@
} }
// cell // cell
- (void)didFailRetry:(NIMMessage *)message { - (void)didFailRetryMessage:(NIMMessage *)message {
if (message.isReceivedMsg) { if (message.isReceivedMsg) {
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil]; [[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
} else { } else {
@@ -139,7 +139,7 @@
} }
#pragma mark - MessageProtocol #pragma mark - CHMessageProtocol
/// ///
- (void)onGetLimitChat:(ChatLimitModel *)chatLimit { - (void)onGetLimitChat:(ChatLimitModel *)chatLimit {
BOOL chatDisabled; BOOL chatDisabled;
@@ -263,12 +263,12 @@
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
NIMMessage * message = [self.messages safeObjectAtIndex1:indexPath.row]; NIMMessage * message = [self.messages safeObjectAtIndex1:indexPath.row];
NSString * identifier = [SessionMessageCell cellContent:message]; NSString * identifier = [CHSessionMessageCell cellContent:message];
///cell ///cell
SessionMessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier]; CHSessionMessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
if (!cell) { if (!cell) {
/// identifier /// identifier
[tableView registerClass:[SessionMessageCell class] forCellReuseIdentifier:identifier]; [tableView registerClass:[CHSessionMessageCell class] forCellReuseIdentifier:identifier];
/// cell /// cell
cell = [tableView dequeueReusableCellWithIdentifier:identifier]; cell = [tableView dequeueReusableCellWithIdentifier:identifier];
} }
@@ -280,7 +280,7 @@
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
NIMMessage *msg = [self.messages safeObjectAtIndex1:indexPath.row]; NIMMessage *msg = [self.messages safeObjectAtIndex1:indexPath.row];
return [SessionMessageCell measureHeight:msg]; return [CHSessionMessageCell measureHeight:msg];
} }
@@ -381,7 +381,7 @@
} }
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
[self.toolbarView foldMenuView]; [self.toolbarView foldToolMenuView];
} }
#pragma mark - MessageToolbarViewDelegate #pragma mark - MessageToolbarViewDelegate
- (void)keyboardWillChangeFrame:(CGRect)rect { - (void)keyboardWillChangeFrame:(CGRect)rect {
@@ -448,9 +448,9 @@
}]; }];
} }
#pragma mark - Get #pragma mark - Get
- (SessionNavView *)sessionNavView { - (CHSessionNavView *)sessionNavView {
if (!_sessionNavView) { if (!_sessionNavView) {
_sessionNavView = [[SessionNavView alloc] init]; _sessionNavView = [[CHSessionNavView alloc] init];
_sessionNavView.delegate = self; _sessionNavView.delegate = self;
} }
return _sessionNavView; return _sessionNavView;
@@ -464,7 +464,7 @@
_sessionTableView.backgroundColor = UIColorFromRGB(0xF8F8FB); _sessionTableView.backgroundColor = UIColorFromRGB(0xF8F8FB);
_sessionTableView.separatorStyle = UITableViewCellSeparatorStyleNone; _sessionTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_sessionTableView.showsVerticalScrollIndicator = NO; _sessionTableView.showsVerticalScrollIndicator = NO;
[_sessionTableView registerClass:[SessionMessageCell class] forCellReuseIdentifier:NSStringFromClass([SessionMessageCell class])]; [_sessionTableView registerClass:[CHSessionMessageCell class] forCellReuseIdentifier:NSStringFromClass([CHSessionMessageCell class])];
} }
return _sessionTableView; return _sessionTableView;
} }
@@ -477,9 +477,9 @@
} }
return _messages; return _messages;
} }
- (SessionToolbarView *)toolbarView { - (CHSessionToolbarView *)toolbarView {
if (!_toolbarView) { if (!_toolbarView) {
_toolbarView = [[SessionToolbarView alloc] init]; _toolbarView = [[CHSessionToolbarView alloc] init];
_toolbarView.delegate = self; _toolbarView.delegate = self;
_toolbarView.sendDisabled = NO; _toolbarView.sendDisabled = NO;
} }

View File

@@ -10,6 +10,7 @@
#import "MineCollectRoomModel.h" #import "MineCollectRoomModel.h"
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import "YMMacro.h" #import "YMMacro.h"
#import "ThemeColor.h"
@interface MewMineCollectionTableViewCell() @interface MewMineCollectionTableViewCell()
@property (nonatomic, strong) NetImageView *avaterImageView; @property (nonatomic, strong) NetImageView *avaterImageView;
@@ -71,7 +72,7 @@
- (NetImageView *)avaterImageView { - (NetImageView *)avaterImageView {
if (!_avaterImageView) { if (!_avaterImageView) {
_avaterImageView = [[NetImageView alloc] init]; _avaterImageView = [[NetImageView alloc] init];
_avaterImageView.backgroundColor = UIColor.redColor; // _avaterImageView.backgroundColor = UIColor.redColor;
} }
return _avaterImageView; return _avaterImageView;
} }
@@ -79,7 +80,6 @@
- (UILabel *)roomTitleLabel { - (UILabel *)roomTitleLabel {
if (!_roomTitleLabel) { if (!_roomTitleLabel) {
_roomTitleLabel = [[UILabel alloc] init]; _roomTitleLabel = [[UILabel alloc] init];
_roomTitleLabel.text = @"这是房间名这是房间名";
_roomTitleLabel.textColor = UIColor.blackColor; _roomTitleLabel.textColor = UIColor.blackColor;
_roomTitleLabel.font = kFontRegular(14); _roomTitleLabel.font = kFontRegular(14);
} }
@@ -89,7 +89,7 @@
- (UIView *)lineView { - (UIView *)lineView {
if (!_lineView) { if (!_lineView) {
_lineView = [[UIView alloc] init]; _lineView = [[UIView alloc] init];
_lineView.backgroundColor = UIColor.grayColor; _lineView.backgroundColor = [ThemeColor dividerColor];
} }
return _lineView; return _lineView;
} }

View File

@@ -1,25 +0,0 @@
//
// RoomFaceSendInfoModel.h
// yinmeng-ios
//
// Created by 触海 on 2023/11/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface RoomFaceSendInfoModel : NSObject
///用户ID
@property (assign, nonatomic) NSInteger uid;
///用户昵称
@property (copy, nonatomic) NSString *nick;
///表情的id
@property (assign, nonatomic) NSInteger faceId;
///结果的图片
@property (strong, nonatomic) UIImage *resultImage;
///🎲数
@property (strong, nonatomic) NSMutableArray *resultIndexes;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,12 +0,0 @@
//
// RoomFaceSendInfoModel.m
// yinmeng-ios
//
// Created by on 2023/11/21.
//
#import "RoomFaceSendInfoModel.h"
@implementation RoomFaceSendInfoModel
@end

View File

@@ -10,10 +10,6 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger { typedef enum : NSUInteger {
// RtcEngineType_Agora = 1001, // 声网
// RtcEngineType_Zego, // 即构
// RtcEngineType_WJ, // 无界
// RtcEngineType_AgoraFast, // 声网急速
RtcEngineType_TRTC, // 腾讯TRTC RtcEngineType_TRTC, // 腾讯TRTC
} RtcEngineType; } RtcEngineType;

View File

@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param complection 完成 /// @param complection 完成
/// @param uid 用户的uid /// @param uid 用户的uid
/// @param intoUid 自己的Uid 判断当前进房用户是否是平台超管 判断进房用户是否开启青少年 /// @param intoUid 自己的Uid 判断当前进房用户是否是平台超管 判断进房用户是否开启青少年
+ (void)getRoomInfo:(HttpRequestHelperCompletion)complection + (void)getRoomInformation:(HttpRequestHelperCompletion)complection
uid:(NSString *)uid uid:(NSString *)uid
intoUid:(NSString *)intoUid; intoUid:(NSString *)intoUid;

View File

@@ -13,7 +13,7 @@
/// @param complection /// @param complection
/// @param uid uid /// @param uid uid
/// @param intoUid Uid /// @param intoUid Uid
+ (void)getRoomInfo:(HttpRequestHelperCompletion)complection uid:(NSString *)uid intoUid:(NSString *)intoUid { + (void)getRoomInformation:(HttpRequestHelperCompletion)complection uid:(NSString *)uid intoUid:(NSString *)intoUid {
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"gs8/IEqGWXCD7Cn4Hs11dw=="];///room/get NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"gs8/IEqGWXCD7Cn4Hs11dw=="];///room/get
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, intoUid, nil]; [self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, intoUid, nil];
} }

View File

@@ -47,7 +47,7 @@
}] uid:uid]; }] uid:uid];
/// ///
[Api getRoomInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [Api getRoomInformation:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
RoomInfoModel *roomInfo = [RoomInfoModel modelWithJSON:data.data]; RoomInfoModel *roomInfo = [RoomInfoModel modelWithJSON:data.data];
[room sendNext:roomInfo]; [room sendNext:roomInfo];
[room sendCompleted]; [room sendCompleted];
@@ -58,18 +58,10 @@
} }
/// ///
- (void)enterNIMRoom:(NSString *)roomUid user:(UserInfoModel *)userInfo { - (void)enterNIMRoom:(NSString *)roomUid user:(UserInfoModel *)userInfo {
NSLog(@"[NIMSDK sharedSDK].loginManager.isLogined : %d",[NIMSDK sharedSDK].loginManager.isLogined);
// if ([NIMSDK sharedSDK].loginManager.isLogined) {
//
// }
NIMChatroomEnterRequest *request = [[NIMChatroomEnterRequest alloc] init]; NIMChatroomEnterRequest *request = [[NIMChatroomEnterRequest alloc] init];
request.roomId = roomUid; request.roomId = roomUid;
YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init]; YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init];
extModel.erbanNo = userInfo.erbanNo; extModel.erbanNo = userInfo.erbanNo;
extModel.fromUid = userInfo.fromUid;
extModel.fromType = userInfo.fromType;
extModel.fromNick = userInfo.fromNick;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon; extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
extModel.gender = userInfo.gender; extModel.gender = userInfo.gender;
NSMutableDictionary *ext = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]]; NSMutableDictionary *ext = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]];

View File

@@ -0,0 +1,21 @@
//
// CHRoomAnimationGroup.h
// yinmeng-ios
//
// Created by 触海 on 2023/12/1.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
NS_ASSUME_NONNULL_BEGIN
@interface CHRoomAnimationGroup : NSObject
/// 图片运动的动画组
/// @param startPoint 开始的点
/// @param endPoint 结束的点
+ (CAAnimationGroup *)createGiftAnimationStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,72 @@
//
// CHRoomAnimationGroup.m
// yinmeng-ios
//
// Created by on 2023/12/1.
//
#import "CHRoomAnimationGroup.h"
#import "YMMacro.h"
@implementation CHRoomAnimationGroup
///
/// @param startPoint
/// @param endPoint
+ (CAAnimationGroup *)createGiftAnimationStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint {
CGPoint centerPoint = CGPointMake(KScreenWidth / 2, KScreenHeight / 2);
CAKeyframeAnimation *animation0 = [CAKeyframeAnimation animation];
animation0.duration = 0.8;
animation0.keyPath = @"transform.scale";
animation0.values = @[@1.0,@1.5,@2.0,@1.5];
animation0.repeatCount = 1;
animation0.calculationMode = kCAAnimationCubic;
animation0.removedOnCompletion = NO;
animation0.fillMode = kCAFillModeForwards;
CAKeyframeAnimation *animation1 = [CAKeyframeAnimation animation];
animation1.duration = 0.8;
animation1.beginTime = 0.8;
animation1.keyPath = @"transform.scale";
animation1.values = @[@1.5,@2.0,@2.5,@3.0];
animation1.repeatCount = 1;
animation1.calculationMode = kCAAnimationCubic;
animation1.removedOnCompletion = NO;
animation1.fillMode = kCAFillModeForwards;
CAKeyframeAnimation *animation2 = [CAKeyframeAnimation animation];
animation2.duration = 0.8;
animation2.beginTime = 0.8;
animation2.keyPath = @"position";
animation2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];;
animation2.values = @[[NSValue valueWithCGPoint:startPoint],[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)]];
animation2.repeatCount = 1;
animation2.removedOnCompletion = NO;
animation2.fillMode = kCAFillModeForwards;
CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation];
animation3.duration = 0.8;
animation3.beginTime = 2.6;//0.8+0.8+1
animation3.keyPath = @"transform.scale";
animation3.values = @[@3,@2.5,@2,@1.5,@1];
animation3.repeatCount = 1;
CAKeyframeAnimation *animation4 = [CAKeyframeAnimation animation];
animation4.duration = 0.8;
animation4.beginTime = 2.6;
animation4.keyPath = @"position";
animation4.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
animation4.values = @[[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)],[NSValue valueWithCGPoint:endPoint]];
animation4.repeatCount = 1;
CAAnimationGroup *group = [CAAnimationGroup animation];
group.duration = 3.2;
group.animations = @[animation0,animation1,animation2, animation3,animation4];
group.repeatCount = 1;
group.removedOnCompletion = NO;
group.fillMode = kCAFillModeForwards;
return group;
}
@end

View File

@@ -6,15 +6,15 @@
// //
#import "YMRoomAnimationHitView.h" #import "YMRoomAnimationHitView.h"
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
#import "RoomGuestDelegate.h" #import "CHRoomGuestDelegate.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface YMRoomAnimationView : YMRoomAnimationHitView<RoomGuestDelegate> @interface YMRoomAnimationView : YMRoomAnimationHitView<CHRoomGuestDelegate>
-(void)resumeTimer; -(void)resumeTimer;
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate; - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
@end @end

View File

@@ -22,31 +22,16 @@
#import "GiftInfoModel.h" #import "GiftInfoModel.h"
/// Tool /// Tool
#import "YMGiftStorage.h" #import "YMGiftStorage.h"
#import "CHRoomAnimationGroup.h"
#import "YMMacro.h" #import "YMMacro.h"
@interface YMRoomAnimationView()<HWDMP4PlayDelegate,SVGAPlayerDelegate> @interface YMRoomAnimationView()<HWDMP4PlayDelegate,SVGAPlayerDelegate>
/// ///
@property (nonatomic,strong) YMRoomAnimationHitView * lowLevelView; @property (nonatomic,strong) YMRoomAnimationHitView * lowLevelView;
///
@property (nonatomic,strong) YMRoomAnimationHitView * middleLevelView;
///
@property (nonatomic,strong) YMRoomAnimationHitView * highLevleView;
///
@property (strong, nonatomic) SVGAParser *parser;
///VAP
@property (nonatomic, strong) YMRoomGiftAnimationParser *vapParser;
///
@property (nonatomic,strong) SVGAImageView *giftEffectView;
///VAP
@property (nonatomic, strong) VAPView *vapGiftEffectView;
/// ///
@property (nonatomic,weak) id<RoomHostDelegate>delegate; @property (nonatomic,weak) id<CHRoomHostDelegate>delegate;
/// ///
@property (nonatomic,strong) NSMutableArray<GiftReceiveInfoModel *> *giftEffectQueue; @property (nonatomic,strong) NSMutableArray<GiftReceiveInfoModel *> *giftEffectQueue;
///
@property (strong,nonatomic)NSMutableSet * bannerDequePool;
///
@property (strong,nonatomic)NSMutableSet * bannerVisiablePool;
/// 6s /// 6s
@property (nonatomic,strong)dispatch_source_t giftEffectTimer; @property (nonatomic,strong)dispatch_source_t giftEffectTimer;
#pragma mark - #pragma mark -
@@ -73,16 +58,13 @@
dispatch_cancel(self.giftEffectTimer); dispatch_cancel(self.giftEffectTimer);
self.giftEffectTimer = nil; self.giftEffectTimer = nil;
} }
// if(self.luckyprizeTimer != nil){
// dispatch_cancel(self.luckyprizeTimer);
// self.luckyprizeTimer = nil;
// }
if(self.giftTimer != nil){ if(self.giftTimer != nil){
dispatch_cancel(self.giftTimer); dispatch_cancel(self.giftTimer);
self.giftTimer = nil; self.giftTimer = nil;
} }
} }
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate { - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
self = [super init]; self = [super init];
if (self) { if (self) {
[[NIMSDK sharedSDK].broadcastManager addDelegate:self]; [[NIMSDK sharedSDK].broadcastManager addDelegate:self];
@@ -96,8 +78,6 @@
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {
[self addSubview:self.lowLevelView]; [self addSubview:self.lowLevelView];
[self addSubview:self.middleLevelView];
[self addSubview:self.highLevleView];
} }
@@ -105,17 +85,9 @@
[self.lowLevelView mas_makeConstraints:^(MASConstraintMaker *make) { [self.lowLevelView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self); make.edges.mas_equalTo(self);
}]; }];
[self.middleLevelView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
[self.highLevleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
} }
#pragma mark - RoomGuestDelegate #pragma mark - CHRoomGuestDelegate
- (void)handleNIMCustomMessage:(NIMMessage *)message { - (void)handleNIMCustomMessage:(NIMMessage *)message {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
@@ -135,44 +107,14 @@
if (content.eventType == NIMChatroomEventTypeEnter) { if (content.eventType == NIMChatroomEventTypeEnter) {
NIMMessageChatroomExtension * messageExt = (NIMMessageChatroomExtension *)message.messageExt; NIMMessageChatroomExtension * messageExt = (NIMMessageChatroomExtension *)message.messageExt;
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from]; NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
// XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithJSON:dic];
// if (extModel.enterHide) {//
// if ([message.from isEqualToString:[AccountInfoStorage instance].getUid]) {
// [self createEnterHideAnimation:dic];
// }
// return;
// }
//
// [self userEnterRoom:content ext:extModel];
} }
} }
#pragma mark - #pragma mark -
/// ///
- (void)receiveGift:(GiftReceiveInfoModel *)receiveInfo { - (void)receiveGift:(GiftReceiveInfoModel *)receiveInfo {
// if ([self isInSudGame]) {return;}
///CPU ///CPU
RoomInfoModel * roomInfor = [self.delegate getRoomInfo]; RoomInfoModel * roomInfor = [self.delegate getRoomInformation];
// if (receiveInfo.isLuckyBagGift) {
// if (receiveInfo.isShowAnimation) {
// // SVGA
// if (receiveInfo.displayGift.count > 0) {
// [receiveInfo.displayGift enumerateObjectsUsingBlock:^(GiftInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
// if (obj.otherViewType == GiftOtherViewTypeMp4 && obj.viewUrl && obj.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
// GiftReceiveInfoModel * model = [[GiftReceiveInfoModel alloc] init];
// model.viewUrl = obj.viewUrl;
// [self.giftEffectQueue addObject:model];
// } else if (obj.hasVggPic && roomInfor.hasAnimationEffect) {
// GiftReceiveInfoModel * model = [[GiftReceiveInfoModel alloc] init];
// model.vggUrl = obj.vggUrl;
// [self.giftEffectQueue addObject:model];
// }
// }];
// }
// } else {
//
// }
// } else {
GiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo; GiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo;
if (!giftInfo) { if (!giftInfo) {
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo: receiveInfo.giftId]; giftInfo = [[YMGiftStorage shareStorage] findGiftInfo: receiveInfo.giftId];
@@ -181,9 +123,6 @@
if (giftInfo) { if (giftInfo) {
receiveInfo.gift = giftInfo; receiveInfo.gift = giftInfo;
} }
// if (receiveInfo.targetUsers.count > 0 && receiveInfo.targetUids.count <= 0) {
// receiveInfo.targetUids = [receiveInfo.targetUsers valueForKeyPath:@"uid"];
// }
NSInteger giftTotal = 0; NSInteger giftTotal = 0;
if (receiveInfo.targetUids.count > 0) { if (receiveInfo.targetUids.count > 0) {
@@ -192,14 +131,6 @@
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice; giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
} }
if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
receiveInfo.viewUrl = giftInfo.viewUrl;
[self.giftEffectQueue addObject:receiveInfo];
} else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && roomInfor.hasAnimationEffect) {///SVGA
receiveInfo.vggUrl = giftInfo.vggUrl;
[self.giftEffectQueue addObject:receiveInfo];
}
// }
if (self.giftEffectTimer == nil && self.giftEffectQueue.count > 0) { if (self.giftEffectTimer == nil && self.giftEffectQueue.count > 0) {
[self startHandleGiftEffectTimer]; [self startHandleGiftEffectTimer];
@@ -241,170 +172,14 @@
} else { } else {
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice; giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
} }
// if (giftTotal >= 520) {
// __block XPRoomGiftBannerView *view = [self.bannerDequePool anyObject];
// if (view == nil) {
// view = [[XPRoomGiftBannerView alloc] init];
// [self.bannerVisiablePool addObject:view];
// }else{
// [self.bannerDequePool removeObject:view];
// }
// [self removeGiftBannerView:view];
// [view configGiftBanner:receiveInfo users:[self makeBannerUsers]];
// view.frame = CGRectMake(KScreenWidth, 100, KScreenWidth, 153);
// [self.lowLevelView addSubview:view];
// POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
// springAnimation.springSpeed = 12;
// springAnimation.springBounciness = 10.f;
// springAnimation.fromValue = [NSValue valueWithCGPoint:view.center];
// springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(view.frame.size.width / 2, view.center.y)];
// @kWeakify(self);
// [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
// @kStrongify(self);
// if (finished) {
// [self removeAnimation:view];
// }
// }];
//
// [springAnimation setAnimationDidStartBlock:^(POPAnimation *anim) {
// @kStrongify(self);
//
// if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
// [self largeGiftStopCarEffect:giftInfo.goldPrice];
// [self playGiftEffectWithVapUrl:giftInfo.viewUrl];
// } else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
// [self largeGiftStopCarEffect:giftInfo.goldPrice];
// [self playGiftEffect:giftInfo.vggUrl];
// }
// }];
//
// [view pop_addAnimation:springAnimation forKey:@"spingOutAnimation"];
// } else {
if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && receiveInfo.viewUrl.length > 0) {//vap
[self largeGiftStopCarEffect:giftInfo.goldPrice];
[self playGiftEffectWithVapUrl:receiveInfo.viewUrl];
} else if (receiveInfo.vggUrl.length > 0) {///
[self largeGiftStopCarEffect:giftInfo.goldPrice];
[self playGiftEffect:receiveInfo.vggUrl];
}
// }
}
- (void)largeGiftStopCarEffect:(double)goldPrice {
// if ([ClientConfig shareConfig].configInfo.hideCarEffectGiftPrice <= goldPrice) {
// self.isLargeGiftAnimating = YES;
// [self.carEffectView stopAnimation];
// [self.carVapEffectView stopHWDMP4];
// [self.carEffectQueue removeAllObjects];
// }
}
/// SVGA
- (void)playGiftEffect:(NSString *)vggUrl {
// if ([self isInSudGame]) {return;}
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
[self.giftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.middleLevelView);
make.width.mas_equalTo(KScreenWidth);
make.height.mas_equalTo(KScreenHeight);
}];
}
[self.parser parseWithURL:[NSURL URLWithString:vggUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.giftEffectView.alpha = 1;
self.giftEffectView.loops = 1;
self.giftEffectView.clearsAfterStop = YES;
self.giftEffectView.videoItem = videoItem;
[self.giftEffectView startAnimation];
}
} failureBlock:^(NSError * _Nullable error) {
}];
}
/// SVGA
- (void)playLuckyGiftEffect:(NSURL *)vggUrl {
// if ([self isInSudGame]) {return;}
// self.luckyGiftEffectView.hidden = NO;
// if (self.luckyGiftEffectView.superview == nil) {
// [self.middleLevelView addSubview:self.luckyGiftEffectView];
// [self.luckyGiftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.center.mas_equalTo(self.middleLevelView);
// make.width.mas_equalTo(KScreenWidth);
// make.height.mas_equalTo(KScreenHeight);
// }];
// }
[self.parser parseWithURL:vggUrl completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
// self.luckyGiftEffectView.alpha = 1;
// self.luckyGiftEffectView.loops = 1;
// self.luckyGiftEffectView.clearsAfterStop = YES;
// self.luckyGiftEffectView.videoItem = videoItem;
// [self.luckyGiftEffectView startAnimation];
}
} failureBlock:^(NSError * _Nullable error) {
}];
}
/// vap
- (void)playGiftEffectWithVapUrl:(NSString *)vapUrl {
self.vapGiftEffectView.hidden = NO;
if (self.vapGiftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.vapGiftEffectView];
[self.vapGiftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.middleLevelView);
make.width.mas_equalTo(KScreenWidth);
make.height.mas_equalTo(KScreenHeight);
}];
}
[self.vapParser parseWithURL:vapUrl completionBlock:^(NSString * _Nullable videoUrl) {
if (videoUrl.length) {
[self.vapGiftEffectView setMute:YES];
[self.vapGiftEffectView playHWDMP4:videoUrl repeatCount:1 delegate:self];
}
} failureBlock:^(NSError * _Nullable error) {
}];
} }
#pragma mark - #pragma mark -
- (void)receiveGiftHandleSendGiftAnimation:(AttachmentModel *)attachment { - (void)receiveGiftHandleSendGiftAnimation:(AttachmentModel *)attachment {
// if ([self isInSudGame]) {return;} if (!self.delegate.getRoomInformation.hasAnimationEffect) {return;}
if (!self.delegate.getRoomInfo.hasAnimationEffect) {return;}
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data]; GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
GiftInfoModel * giftInfo = receiveInfo.gift ? receiveInfo.gift : receiveInfo.giftInfo; GiftInfoModel * giftInfo = receiveInfo.gift ? receiveInfo.gift : receiveInfo.giftInfo;
if (attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend || attachment.second == Custom_Message_Sub_Gift_LuckySend) {
// NSString * giftId = [NSString stringWithFormat:@"%ld", receiveInfo.luckyGiftList.giftList.firstObject.giftId];
// giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:giftId];
}
if (giftInfo == nil) { if (giftInfo == nil) {
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo:receiveInfo.giftId]; giftInfo = [[YMGiftStorage shareStorage] findGiftInfo:receiveInfo.giftId];
@@ -412,7 +187,6 @@
/// 使 /// 使
receiveInfo.gift = giftInfo; receiveInfo.gift = giftInfo;
// receiveInfo.isLuckyBagGift = NO;
[self.giftQueue addObject:receiveInfo]; [self.giftQueue addObject:receiveInfo];
if (self.giftTimer == nil && self.giftQueue > 0) { if (self.giftTimer == nil && self.giftQueue > 0) {
[self startGiftQueueTimer]; [self startGiftQueueTimer];
@@ -447,17 +221,10 @@
CGPoint starPoint = [self getGiftAnimationPoint:sendUid isEnd:NO]; CGPoint starPoint = [self getGiftAnimationPoint:sendUid isEnd:NO];
CGPoint endPoint; CGPoint endPoint;
NSArray * targetUids; NSArray * targetUids;
// if (receiveInfo.isLuckyBagGift) {
// targetUids = @[receiveInfo.targetUid];
// } else {
targetUids = receiveInfo.targetUids; targetUids = receiveInfo.targetUids;
if (targetUids.count <= 0) { if (targetUids.count <= 0) {
// targetUids = [receiveInfo.targetUsers valueForKeyPath:@"uid"];
// if (targetUids.count <=0) {
targetUids = @[receiveInfo.targetUid]; targetUids = @[receiveInfo.targetUid];
// }
} }
// }
for (NSString *targetUid in targetUids) { for (NSString *targetUid in targetUids) {
NSString * userId = targetUid; NSString * userId = targetUid;
@@ -508,71 +275,12 @@
} }
[giftImageView sd_setImageWithURL:[NSURL URLWithString:giftUrl]]; [giftImageView sd_setImageWithURL:[NSURL URLWithString:giftUrl]];
[self.lowLevelView addSubview:giftImageView]; [self.lowLevelView addSubview:giftImageView];
CAAnimationGroup *group = [self createGiftAnimationStartPoint:startPoint endPoint:endPoint];
CAAnimationGroup *group = [CHRoomAnimationGroup createGiftAnimationStartPoint:startPoint endPoint:endPoint];
[giftImageView.layer addAnimation:group forKey:@"giftDisplayViewAnimation"]; [giftImageView.layer addAnimation:group forKey:@"giftDisplayViewAnimation"];
[self performSelector:@selector(aniationDidFinish:) withObject:giftImageView afterDelay:(3.2+0.25)]; [self performSelector:@selector(aniationDidFinish:) withObject:giftImageView afterDelay:(3.2+0.25)];
} }
///
/// @param startPoint
/// @param endPoint
- (CAAnimationGroup *)createGiftAnimationStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint{
CGPoint centerPoint = CGPointMake(KScreenWidth / 2, KScreenHeight / 2);
CAKeyframeAnimation *animation0 = [CAKeyframeAnimation animation];
animation0.duration = 0.8;
animation0.keyPath = @"transform.scale";
animation0.values = @[@1.0,@1.5,@2.0,@1.5];
animation0.repeatCount = 1;
animation0.calculationMode = kCAAnimationCubic;
animation0.removedOnCompletion = NO;
animation0.fillMode = kCAFillModeForwards;
CAKeyframeAnimation *animation1 = [CAKeyframeAnimation animation];
animation1.duration = 0.8;
animation1.beginTime = 0.8;
animation1.keyPath = @"transform.scale";
animation1.values = @[@1.5,@2.0,@2.5,@3.0];
animation1.repeatCount = 1;
animation1.calculationMode = kCAAnimationCubic;
animation1.removedOnCompletion = NO;
animation1.fillMode = kCAFillModeForwards;
CAKeyframeAnimation *animation2 = [CAKeyframeAnimation animation];
animation2.duration = 0.8;
animation2.beginTime = 0.8;
animation2.keyPath = @"position";
animation2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];;
animation2.values = @[[NSValue valueWithCGPoint:startPoint],[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)]];
animation2.repeatCount = 1;
animation2.removedOnCompletion = NO;
animation2.fillMode = kCAFillModeForwards;
CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation];
animation3.duration = 0.8;
animation3.beginTime = 2.6;//0.8+0.8+1
animation3.keyPath = @"transform.scale";
animation3.values = @[@3,@2.5,@2,@1.5,@1];
animation3.repeatCount = 1;
CAKeyframeAnimation *animation4 = [CAKeyframeAnimation animation];
animation4.duration = 0.8;
animation4.beginTime = 2.6;
animation4.keyPath = @"position";
animation4.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
animation4.values = @[[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)],[NSValue valueWithCGPoint:endPoint]];
animation4.repeatCount = 1;
CAAnimationGroup *group = [CAAnimationGroup animation];
group.duration = 3.2;
group.animations = @[animation0,animation1,animation2, animation3,animation4];
group.repeatCount = 1;
group.removedOnCompletion = NO;
group.fillMode = kCAFillModeForwards;
return group;
}
- (void)aniationDidFinish:(FLAnimatedImageView *)giftImageView{ - (void)aniationDidFinish:(FLAnimatedImageView *)giftImageView{
[giftImageView removeFromSuperview]; [giftImageView removeFromSuperview];
giftImageView.image = nil; giftImageView.image = nil;
@@ -582,71 +290,6 @@
} }
#pragma mark - Getters And Setters #pragma mark - Getters And Setters
- (SVGAImageView *)giftEffectView {
if (!_giftEffectView) {
_giftEffectView = [[SVGAImageView alloc]init];
_giftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
_giftEffectView.userInteractionEnabled = NO;
_giftEffectView.delegate = self;
_giftEffectView.hidden = YES;
}
return _giftEffectView;
}
- (VAPView *)vapGiftEffectView {
if (!_vapGiftEffectView) {
_vapGiftEffectView = [[VAPView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
_vapGiftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
_vapGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
_vapGiftEffectView.hidden = YES;
}
return _vapGiftEffectView;
}
//- (SVGAImageView *)luckyGiftEffectView {
// if (!_luckyGiftEffectView) {
// _luckyGiftEffectView = [[SVGAImageView alloc]init];
// _luckyGiftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
// _luckyGiftEffectView.userInteractionEnabled = NO;
// _luckyGiftEffectView.delegate = self;
// _luckyGiftEffectView.hidden = YES;
// }
// return _luckyGiftEffectView;
//}
//
//- (VAPView *)luckyVapGiftEffectView {
// if (!_luckyVapGiftEffectView) {
// _luckyVapGiftEffectView = [[VAPView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
// _luckyVapGiftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
// _luckyVapGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
// _luckyVapGiftEffectView.hidden = YES;
// }
// return _luckyVapGiftEffectView;
//}
//- (VAPView *)carVapEffectView {
// if (!_carVapEffectView) {
// _carVapEffectView = [[VAPView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
// _carVapEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
// _carVapEffectView.contentMode = UIViewContentModeScaleAspectFill;
// _carVapEffectView.hidden = YES;
// }
// return _carVapEffectView;
//}
- (YMRoomGiftAnimationParser *)vapParser {
if (!_vapParser) {
_vapParser = [[YMRoomGiftAnimationParser alloc] init];
}
return _vapParser;
}
- (SVGAParser *)parser {
if (!_parser) {
_parser = [[SVGAParser alloc]init];
}
return _parser;
}
- (NSMutableArray<GiftReceiveInfoModel *> *)giftEffectQueue { - (NSMutableArray<GiftReceiveInfoModel *> *)giftEffectQueue {
if (!_giftEffectQueue) { if (!_giftEffectQueue) {
@@ -655,33 +298,6 @@
return _giftEffectQueue; return _giftEffectQueue;
} }
//- (NSMutableArray<YMGiftBigPrizeModel *> *)bigPrizeGiftQueue {
// if (!_bigPrizeGiftQueue) {
// _bigPrizeGiftQueue = [NSMutableArray array];
// }
// return _bigPrizeGiftQueue;
//}
//
//- (NSMutableArray<YMRoomGiftBroadCastModel *> *)giftBroadcastQueue {
// if (!_giftBroadcastQueue) {
// _giftBroadcastQueue = [NSMutableArray array];
// }
// return _giftBroadcastQueue;
//}
- (NSMutableSet *)bannerDequePool {
if (!_bannerDequePool) {
_bannerDequePool = [NSMutableSet set];
}
return _bannerDequePool;
}
- (NSMutableSet *)bannerVisiablePool {
if (!_bannerVisiablePool) {
_bannerVisiablePool = [NSMutableSet set];
}
return _bannerVisiablePool;
}
- (YMRoomAnimationHitView *)lowLevelView { - (YMRoomAnimationHitView *)lowLevelView {
if (!_lowLevelView) { if (!_lowLevelView) {
_lowLevelView = [[YMRoomAnimationHitView alloc] init]; _lowLevelView = [[YMRoomAnimationHitView alloc] init];
@@ -691,25 +307,6 @@
return _lowLevelView; return _lowLevelView;
} }
- (YMRoomAnimationHitView *)middleLevelView {
if (!_middleLevelView) {
_middleLevelView = [[YMRoomAnimationHitView alloc] init];
_middleLevelView.backgroundColor = [UIColor clearColor];
_middleLevelView.userInteractionEnabled = YES;
_middleLevelView.tag = 1001;
}
return _middleLevelView;
}
- (YMRoomAnimationHitView *)highLevleView {
if (!_highLevleView) {
_highLevleView = [[YMRoomAnimationHitView alloc] init];
_highLevleView.backgroundColor = [UIColor clearColor];
_highLevleView.userInteractionEnabled = YES;
}
return _highLevleView;
}
- (NSMutableArray<GiftReceiveInfoModel *> *)giftQueue { - (NSMutableArray<GiftReceiveInfoModel *> *)giftQueue {
if (!_giftQueue) { if (!_giftQueue) {
_giftQueue = [NSMutableArray array]; _giftQueue = [NSMutableArray array];
@@ -731,115 +328,5 @@
return _giftVisibleArray; return _giftVisibleArray;
} }
//- (NSMutableArray *)candyTreegiftQueue {
// if (!_candyTreegiftQueue) {
// _candyTreegiftQueue = [NSMutableArray array];
// }
// return _candyTreegiftQueue;
//}
//
//- (NSMutableArray *)compoundGiftQueue {
// if (!_compoundGiftQueue) {
// _compoundGiftQueue = [NSMutableArray array];
// }
// return _compoundGiftQueue;
//}
//
//- (NSMutableArray *)nobleLevelUpQueue {
// if (!_nobleLevelUpQueue) {
// _nobleLevelUpQueue = [NSMutableArray array];
// }
// return _nobleLevelUpQueue;
//}
//
//- (NSMutableArray<NSDictionary *> *)carEffectQueue {
// if (_carEffectQueue == nil) {
// _carEffectQueue = [NSMutableArray array];
// }
// return _carEffectQueue;
//}
//- (SVGAImageView *)carEffectView {
// if (_carEffectView == nil) {
// _carEffectView = [[SVGAImageView alloc]init];
// _carEffectView.delegate = self;
// _carEffectView.contentMode = UIViewContentModeScaleAspectFit;
// _carEffectView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
// _carEffectView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.3];
// _carEffectView.alpha = 0;
// _carEffectView.userInteractionEnabled = NO;
// }
// return _carEffectView;
//}
//
//- (NSMutableArray<NSDictionary *> *)enterEffectQueue {
// if (_enterEffectQueue == nil) {
// _enterEffectQueue = [NSMutableArray array];
// }
// return _enterEffectQueue;
//}
//- (SVGAImageView *)enterEffectView {
// if (_enterEffectView == nil) {
// _enterEffectView = [[SVGAImageView alloc]init];
// _enterEffectView.delegate = self;
// _enterEffectView.contentMode = UIViewContentModeScaleAspectFit;
// _enterEffectView.frame = CGRectMake(0, 0, KScreenWidth, 40);
// _enterEffectView.backgroundColor = [UIColor clearColor];
// _enterEffectView.alpha = 0;
// _enterEffectView.userInteractionEnabled = NO;
// }
// return _enterEffectView;
//}
//
//
//- (SVGAImageView *)datingEffectView {
// if (_datingEffectView == nil) {
// _datingEffectView = [[SVGAImageView alloc]init];
// _datingEffectView.delegate = self;
// _datingEffectView.contentMode = UIViewContentModeScaleAspectFit;
// _datingEffectView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
// _datingEffectView.backgroundColor = [UIColor clearColor];
// _datingEffectView.alpha = 0;
// _datingEffectView.userInteractionEnabled = NO;
// }
// return _datingEffectView;
//}
//- (NSMutableArray<AcrossRoomPKPrizeModel *> *)acrossRoomPKQueue {
// if (!_acrossRoomPKQueue) {
// _acrossRoomPKQueue = [NSMutableArray array];
// }
// return _acrossRoomPKQueue;
//}
//- (NSMutableArray<AttachmentModel *> *)sailingQueue {
// if (!_sailingQueue) {
// _sailingQueue = [NSMutableArray array];
// }
// return _sailingQueue;
//}
//
//- (NSMutableArray<AttachmentModel *> *)graffitiGiftQueue {
// if (!_graffitiGiftQueue) {
// _graffitiGiftQueue = [NSMutableArray array];
// }
// return _graffitiGiftQueue;
//}
//- (SVGAImageView *)wishGiftEffectView {
// if (_wishGiftEffectView == nil) {
// _wishGiftEffectView = [[SVGAImageView alloc]init];
// _wishGiftEffectView.delegate = self;
// _wishGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
// _wishGiftEffectView.frame = CGRectMake(0, 0, 210, 183);
// _wishGiftEffectView.backgroundColor = [UIColor clearColor];
// _wishGiftEffectView.alpha = 1;
// _wishGiftEffectView.userInteractionEnabled = NO;
// }
// return _wishGiftEffectView;
//}
@end @end

View File

@@ -0,0 +1,24 @@
//
// RoomAnimationProtocol.h
// yinmeng-ios
//
// Created by 触海 on 2023/11/21.
//
#import <Foundation/Foundation.h>
/** XPRoomAnimationView 用到的协议。
RoomVC 的子 View 之间的通信协议,通过 CHRoomHostDelegate 和 CHRoomGuestDelegate 继承实现。
调用方向XPRoomAnimationView —> CHRoomHostDelegate —> CHRoomAnimationProtocolCHRoomGuestDelegate继承
*/
@protocol CHRoomAnimationProtocol <NSObject>
@optional
/**
* StageView 专用。
*/
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid;
@end

View File

@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "MicroQueueProtocol.h" #import "MicroQueueProtocol.h"
#import "RoomAnimationProtocol.h" #import "CHRoomAnimationProtocol.h"
@class NIMMessage, NIMRecentSession; @class NIMMessage, NIMRecentSession;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -17,20 +17,19 @@ NS_ASSUME_NONNULL_BEGIN
**Note:** **Note:**
MicroQueueProtocolRoomAnimationProtocol View MicroQueueProtocolCHRoomAnimationProtocol View
View > RoomHostDelegate > XXXProtocolRoomGuestDelegate View > CHRoomHostDelegate > XXXProtocolRoomGuestDelegate
*/ */
@protocol RoomGuestDelegate <NSObject, MicroQueueProtocol, RoomAnimationProtocol> @protocol CHRoomGuestDelegate <NSObject, MicroQueueProtocol, CHRoomAnimationProtocol>
@optional @optional
- (void)onRoomUpdate; - (void)onRoomUpdate;
- (void)onUserUpdate; - (void)onUserUpdate;
- (void)onRoomEntered; - (void)onRoomEntered;
/// 个播 可以切换房间
//- (void)onRoomChange; /// NIM 事件监听
//- (void)onRoomMiniEntered;///最小化进房
- (void)handleNIMNotificationMessage:(NIMMessage *)message; - (void)handleNIMNotificationMessage:(NIMMessage *)message;
- (void)handleNIMCustomMessage:(NIMMessage *)message; - (void)handleNIMCustomMessage:(NIMMessage *)message;
- (void)handleNIMTextMessage:(NIMMessage *)message; - (void)handleNIMTextMessage:(NIMMessage *)message;

View File

@@ -0,0 +1,29 @@
//
// CHCHRoomHostDelegate.h
// yinmeng-ios
//
// Created by 触海 on 2023/12/1.
//
#import <UIKit/UIKit.h>
#import "MicroQueueProtocol.h"
#import "CHRoomAnimationProtocol.h"
@class RoomInfoModel, UserInfoModel;
NS_ASSUME_NONNULL_BEGIN
@protocol CHRoomHostDelegate <NSObject, MicroQueueProtocol,CHRoomAnimationProtocol>
// 获取房间信息
- (RoomInfoModel *)getRoomInformation;
// 获取用户信息
- (UserInfoModel *)getUserInformation;
/// 退出房间
- (void)exitCurrentRoom;
/// 获取当前的导航控制器
- (UINavigationController *)getCurrentNavigationController;
@end
NS_ASSUME_NONNULL_END

View File

@@ -6,17 +6,17 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface YMRoomSendTextView : UIView @interface YMRoomSendTextView : UIView
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate; - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
///输入框 ///输入框
@property (nonatomic, strong, readonly) UITextField *editTextFiled; @property (nonatomic, strong, readonly) UITextField *editTextFiled;
///发小消息的弹框 ///发小消息的弹框
+ (instancetype)showTextView:(UIView *)view delegate:(id<RoomHostDelegate>)delegate atUid:(NSString *)uid atNick:(NSString *)nick; + (instancetype)showTextView:(UIView *)view delegate:(id<CHRoomHostDelegate>)delegate;
@end @end

View File

@@ -35,7 +35,7 @@
/// ///
@property (nonatomic,copy) NSString *inputMessage; @property (nonatomic,copy) NSString *inputMessage;
/// ///
@property (nonatomic,weak) id<RoomHostDelegate> delegate; @property (nonatomic,weak) id<CHRoomHostDelegate> delegate;
@end @end
@@ -45,7 +45,7 @@
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
} }
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate { - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
self = [super initWithFrame:CGRectMake(0, KScreenHeight - 40, KScreenWidth, 40)]; self = [super initWithFrame:CGRectMake(0, KScreenHeight - 40, KScreenWidth, 40)];
if (self) { if (self) {
self.delegate = delegate; self.delegate = delegate;
@@ -59,78 +59,43 @@
#pragma mark - Public Method #pragma mark - Public Method
+ (instancetype)showTextView:(UIView *)view delegate:(id<RoomHostDelegate>)delegate atUid:(NSString *)uid atNick:(NSString *)nick { + (instancetype)showTextView:(UIView *)view delegate:(id<CHRoomHostDelegate>)delegate {
__block YMRoomSendTextView * textView; __block YMRoomSendTextView * sendTextView;
[view.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { [view.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[YMRoomSendTextView class]]) { if ([obj isKindOfClass:[YMRoomSendTextView class]]) {
textView = obj; sendTextView = obj;
*stop = YES; *stop = YES;
} }
}]; }];
if (textView == nil) { if (sendTextView == nil) {
textView = [[YMRoomSendTextView alloc] initWithDelegate:delegate]; sendTextView = [[YMRoomSendTextView alloc] initWithDelegate:delegate];
[view addSubview:textView]; [view addSubview:sendTextView];
} }
textView.hidden = NO; sendTextView.hidden = NO;
if(textView.superview == nil ){ if(sendTextView.superview == nil ){
[view addSubview:textView]; [view addSubview:sendTextView];
} }
[textView mas_makeConstraints:^(MASConstraintMaker *make) { [sendTextView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(view); make.left.right.bottom.mas_equalTo(view);
make.height.mas_equalTo(40); make.height.mas_equalTo(40);
}]; }];
[textView.editTextFiled becomeFirstResponder]; [sendTextView.editTextFiled becomeFirstResponder];
if (nick) {
// [textView.atUids addObject:uid]; return sendTextView;
// [textView.atNames addObject:[NSString stringWithFormat:@"@%@", nick]];
textView.editTextFiled.text = [NSString stringWithFormat:@"%@@%@\u2004", textView.editTextFiled.text, nick];
textView.inputMessage = textView.editTextFiled.text;
textView.sendButton.enabled = YES;
}
return textView;
} }
#pragma mark - Response #pragma mark - Response
- (void)sendButtonDidClick:(UIButton *)sender { - (void)sendButtonDidClick:(UIButton *)sender {
UserInfoModel * userInfo = [self.delegate getUserInfo]; UserInfoModel * userInfo = [self.delegate getUserInformation];
YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init]; YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init];
// extModel.defUser = userInfo.defUser;
extModel.erbanNo = userInfo.erbanNo; extModel.erbanNo = userInfo.erbanNo;
// extModel.carName = userInfo.carName;
// extModel.inRoomNameplatePic = userInfo.nameplatePic;
// extModel.inRoomNameplateWord = userInfo.nameplateWord;
// extModel.charmUrl = userInfo.userLevelVo.charmUrl;
// extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
// extModel.experUrl = userInfo.userLevelVo.experUrl;
extModel.newUser = userInfo.newUser; extModel.newUser = userInfo.newUser;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon; extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
// extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
// extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
// extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
NIMMessage * message = [[NIMMessage alloc] init]; NIMMessage * message = [[NIMMessage alloc] init];
message.text = self.inputMessage; message.text = self.inputMessage;
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid]; NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid];
//@
NSMutableArray *nickArray = [NSMutableArray array];
NSMutableArray *uidArray = [NSMutableArray array];
// for (int i = 0; i<self.atNames.count; i++) {
// NSString *nick = self.atNames[i];
// if ([self.editTextFiled.text containsString:nick]) {
// if ([nickArray containsObject:nick]) {
// continue;
// } else {
// [nickArray addObject:nick];
// [uidArray addObject:self.atUids[i]];
// }
// }
// }
id uidStr = [uidArray toJSONObject];
id nickStr = [nickArray toJSONObject];
// [remoteExt safeSetObject:uidStr forKey:@"atUids"];
// [remoteExt safeSetObject:nickStr forKey:@"atNames"];
message.remoteExt = remoteExt; message.remoteExt = remoteExt;
/// ///
@@ -138,14 +103,12 @@
option.yidunEnabled = YES; option.yidunEnabled = YES;
option.businessId = KeyWithType(keyType_YiDunBussinessId); option.businessId = KeyWithType(keyType_YiDunBussinessId);
message.antiSpamOption = option; message.antiSpamOption = option;
NSString * sessionId = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].roomId]; NSString * sessionId = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInformation].roomId];
// //
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom]; NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session completion:^(NSError * _Nullable error) { [[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session completion:^(NSError * _Nullable error) {
self.editTextFiled.text = @""; self.editTextFiled.text = @"";
[self.editTextFiled resignFirstResponder]; [self.editTextFiled resignFirstResponder];
// [self.atUids removeAllObjects];
// [self.atNames removeAllObjects];
self.inputMessage = nil; self.inputMessage = nil;
}]; }];
} }
@@ -154,11 +117,11 @@
[self.superview bringSubviewToFront:self]; [self.superview bringSubviewToFront:self];
NSDictionary *info = [notification userInfo]; NSDictionary *info = [notification userInfo];
NSValue *value = [info objectForKey:UIKeyboardFrameEndUserInfoKey]; NSValue *value = [info objectForKey:UIKeyboardFrameEndUserInfoKey];
CGFloat keyBoardEndY = value.CGRectValue.origin.y; CGFloat keyBoardY = value.CGRectValue.origin.y;
NSNumber *curve = [info objectForKey:UIKeyboardAnimationCurveUserInfoKey]; NSNumber *curveUser = [info objectForKey:UIKeyboardAnimationCurveUserInfoKey];
CGFloat duration = [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue]; CGFloat duration = [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue];
CGRect endKeyboardRect = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; CGRect endRect = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
CGFloat h = endKeyboardRect.size.height; CGFloat h = endRect.size.height;
[UIView animateWithDuration:duration animations:^{ [UIView animateWithDuration:duration animations:^{
[self mas_remakeConstraints:^(MASConstraintMaker *make) { [self mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.superview); make.left.right.equalTo(self.superview);
@@ -166,8 +129,8 @@
make.bottom.equalTo(self.superview).offset(-h); make.bottom.equalTo(self.superview).offset(-h);
}]; }];
[UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationCurve:[curve intValue]]; [UIView setAnimationCurve:[curveUser intValue]];
self.center = CGPointMake(self.center.x, keyBoardEndY - statusbarHeight - self.bounds.size.height/2.0); self.center = CGPointMake(self.center.x, keyBoardY - statusbarHeight - self.bounds.size.height/2.0);
}]; }];
} }
@@ -184,8 +147,8 @@
}]; }];
} }
-(void)textFieldEditChanged:(NSNotification *)notification{ -(void)textFieldEditChanged:(NSNotification *)noti{
UITextField *textField = (UITextField *)notification.object; UITextField *textField = (UITextField *)noti.object;
NSString *toBeString = textField.text; NSString *toBeString = textField.text;
NSString *lang = [textField.textInputMode primaryLanguage]; NSString *lang = [textField.textInputMode primaryLanguage];
if ([lang isEqualToString:@"zh-Hans"]){// if ([lang isEqualToString:@"zh-Hans"]){//
@@ -219,11 +182,7 @@
} }
} }
self.inputMessage = textField.text; self.inputMessage = textField.text;
if (self.inputMessage.length > 0) { self.sendButton.enabled = self.inputMessage.length > 0;
self.sendButton.enabled = YES;
} else {
self.sendButton.enabled = NO;
}
} }
#pragma mark - Private Method #pragma mark - Private Method
@@ -273,8 +232,7 @@
[_sendButton setTitle:@"发送" forState:UIControlStateNormal]; [_sendButton setTitle:@"发送" forState:UIControlStateNormal];
_sendButton.titleLabel.textColor = [ThemeColor mainTextColor]; _sendButton.titleLabel.textColor = [ThemeColor mainTextColor];
_sendButton.titleLabel.font = [UIFont systemFontOfSize:15]; _sendButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_sendButton setBackgroundImage:[UIImage imageWithColor:[ThemeColor disableButtonColor] ]forState:UIControlStateDisabled]; [_sendButton setBackgroundImage:[UIImage imageWithColor:[ThemeColor colorWithHexString:@"#9552FF"] ] forState:UIControlStateNormal];
[_sendButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
_sendButton.enabled = NO; _sendButton.enabled = NO;
_sendButton.layer.cornerRadius = 5.0; _sendButton.layer.cornerRadius = 5.0;
_sendButton.layer.masksToBounds = YES; _sendButton.layer.masksToBounds = YES;

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPRoomMessageHeaderView : UIView @interface CHRoomMessageHeaderView : UIView
///头部的背景颜色 ///头部的背景颜色
@property (nonatomic,strong) UIColor *bubbleColor; @property (nonatomic,strong) UIColor *bubbleColor;
@end @end

View File

@@ -5,7 +5,7 @@
// Created by on 2023/11/21. // Created by on 2023/11/21.
// //
#import "XPRoomMessageHeaderView.h" #import "CHRoomMessageHeaderView.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
///Tool ///Tool
@@ -13,14 +13,14 @@
#import "YMRoomMessageConstant.h" #import "YMRoomMessageConstant.h"
#import "YMMacro.h" #import "YMMacro.h"
@interface XPRoomMessageHeaderView () @interface CHRoomMessageHeaderView ()
/// ///
@property (nonatomic,strong) UIView *bubbleView; @property (nonatomic,strong) UIView *bubbleBgView;
/// ///
@property (nonatomic,strong) UILabel *titleLabel; @property (nonatomic,strong) UILabel *titleTextLabel;
@end @end
@implementation XPRoomMessageHeaderView @implementation CHRoomMessageHeaderView
- (instancetype)initWithFrame:(CGRect)frame - (instancetype)initWithFrame:(CGRect)frame
{ {
@@ -33,62 +33,62 @@
} }
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {
[self addSubview:self.bubbleView]; [self addSubview:self.bubbleBgView];
[self addSubview:self.titleLabel]; [self addSubview:self.titleTextLabel];
} }
- (void)initSubViewConstraints { - (void)initSubViewConstraints {
/// 绿 /// 绿
NSString *title = @"平台严禁未成年人直播或打赏,倡导绿色互动,禁止宣传及发布政治、低俗、暴力、色情等违规违法内容,严禁违规交易和诱导欺诈用户,如有发现请及时举报。"; NSString *title = @"平台严禁未成年人直播或打赏,倡导绿色互动,禁止宣传及发布政治、低俗、暴力、色情等违规违法内容,严禁违规交易和诱导欺诈用户,如有发现请及时举报。";
self.titleLabel.text = title; self.titleTextLabel.text = title;
CGFloat height = [self getHeaderViewHeight:title] + kRoomMessageTextSpaceHeight *2; CGFloat height = [self getHeaderViewHeight:title] + kRoomMessageTextSpace *2;
[self mas_makeConstraints:^(MASConstraintMaker *make) { [self mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kRoomMessageMaxWidth); make.width.mas_equalTo(kRoomMessageMaxWidth);
make.height.mas_equalTo(height); make.height.mas_equalTo(height);
}]; }];
[self.bubbleView mas_makeConstraints:^(MASConstraintMaker *make) { [self.bubbleBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.right.mas_equalTo(self); make.left.top.right.mas_equalTo(self);
make.bottom.mas_equalTo(self).offset(-10); make.bottom.mas_equalTo(self).offset(-10);
}]; }];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.titleTextLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self).inset(10); make.left.right.mas_equalTo(self).inset(10);
make.centerY.mas_equalTo(self.bubbleView); make.centerY.mas_equalTo(self.bubbleBgView);
}]; }];
} }
/// ///
- (CGFloat)getHeaderViewHeight:(NSString *)title { - (CGFloat)getHeaderViewHeight:(NSString *)title {
return [title boundingRectWithSize:CGSizeMake(kRoomMessageMaxWidth - 20, CGFLOAT_MAX) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageDefalutFont]} context:nil].size.height; return [title boundingRectWithSize:CGSizeMake(kRoomMessageMaxWidth - 20, CGFLOAT_MAX) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageTextFont]} context:nil].size.height;
} }
#pragma mark - Getters And Setters #pragma mark - Getters And Setters
- (void)setBubbleColor:(UIColor *)bubbleColor { - (void)setBubbleColor:(UIColor *)bubbleColor {
_bubbleColor = bubbleColor; _bubbleColor = bubbleColor;
if (_bubbleColor) { if (_bubbleColor) {
_bubbleView.backgroundColor = _bubbleColor; _bubbleBgView.backgroundColor = _bubbleColor;
} }
} }
- (UIView *)bubbleView { - (UIView *)bubbleBgView {
if (!_bubbleView) { if (!_bubbleBgView) {
_bubbleView = [[UIView alloc] init]; _bubbleBgView = [[UIView alloc] init];
_bubbleView.backgroundColor = [ThemeColor messageBubbleColor]; _bubbleBgView.backgroundColor = [ThemeColor messageBubbleColor];
_bubbleView.layer.masksToBounds = YES; _bubbleBgView.layer.masksToBounds = YES;
_bubbleView.layer.cornerRadius = kRoomMessageBubbleCornerRadius; _bubbleBgView.layer.cornerRadius = kRoomMessageBubbleCornerRadius;
} }
return _bubbleView; return _bubbleBgView;
} }
- (UILabel *)titleLabel { - (UILabel *)titleTextLabel {
if (!_titleLabel) { if (!_titleTextLabel) {
_titleLabel = [[UILabel alloc] init]; _titleTextLabel = [[UILabel alloc] init];
_titleLabel.font = [UIFont systemFontOfSize:kRoomMessageDefalutFont]; _titleTextLabel.font = [UIFont systemFontOfSize:kRoomMessageTextFont];
_titleLabel.textColor = UIColor.whiteColor; _titleTextLabel.textColor = UIColor.whiteColor;
_titleLabel.numberOfLines = 0; _titleTextLabel.numberOfLines = 0;
} }
return _titleLabel; return _titleTextLabel;
} }
@end @end

View File

@@ -12,10 +12,6 @@ NS_ASSUME_NONNULL_BEGIN
@interface YMMessageRemoteExtModel : NSObject @interface YMMessageRemoteExtModel : NSObject
@property (nonatomic,assign) NSInteger erbanNo; @property (nonatomic,assign) NSInteger erbanNo;
///跟随的
@property (nonatomic,copy) NSString *fromNick;
@property (nonatomic,assign) UserEnterRoomFromType fromType;
@property (nonatomic,copy) NSString *fromUid;
///性别 ///性别
@property (nonatomic, assign) GenderType gender; @property (nonatomic, assign) GenderType gender;
///贵族icon ///贵族icon

View File

@@ -11,13 +11,13 @@
#define kRoomMessageMaxWidth (KScreenWidth - 15 - 90) #define kRoomMessageMaxWidth (KScreenWidth - 15 - 90)
///公屏文本字体的大小 ///公屏文本字体的大小
static CGFloat kRoomMessageDefalutFont = 12; static CGFloat kRoomMessageTextFont = 12.0;
///文字上下的间隙 ///文字上下的间隙
static CGFloat kRoomMessageTextSpaceHeight = 10; static CGFloat kRoomMessageTextSpace = 10.0;
static CGFloat kRoomMessageBubbleCornerRadius = 7; static CGFloat kRoomMessageBubbleCornerRadius = 7.0;
///公屏保存的最大数 ///公屏保存的最大数
static NSInteger kRoomMessageMaxLength = 1000; static NSInteger kRoomMessageMaxLength = 1000.0;
#endif /* YMRoomMessageConstant_h */ #endif /* YMRoomMessageConstant_h */

View File

@@ -38,98 +38,10 @@
[NSSet setWithObjects: [NSSet setWithObjects:
@(Custom_Message_Sub_Queue_Kick), @(Custom_Message_Sub_Queue_Kick),
nil], nil],
@(CustomMessageType_Candy_Tree):
[NSSet setWithObjects:
@(Custom_Message_Sub_Candy_Tree_Me),
@(Custom_Message_Sub_Candy_Tree_InRoom),
@(Custom_Message_Sub_Candy_Tree_AllRoom),
@(Custom_Message_Sub_Candy_Tree_AllRoom_Notify),
@(Custom_Message_Sub_Candy_Tree_InRoom_NeedAllMicSend),
nil],
@(CustomMessageType_Arrange_Mic):
[NSSet setWithObjects:
@(Custom_Message_Sub_Arrange_Mic_Mode_Open),
@(Custom_Message_Sub_Arrange_Mic_Mode_Close),
@(Custom_Message_Sub_Arrange_Mic_Free_Mic_Open),
@(Custom_Message_Sub_Arrange_Mic_Free_Mic_Close),
nil],
@(CustomMessageType_Update_RoomInfo):
[NSSet setWithObjects:
@(Custom_Message_Sub_Update_RoomInfo_MessageState),
@(Custom_Message_Sub_Update_RoomInfo_AnimateEffect),
nil],
@(CustomMessageType_Collection_Room):
[NSSet setWithObjects:
@(Custom_Message_Sub_Collect_Room_Tips),
nil],
@(CustomMessageType_RoomPlay_Dating):
[NSSet setWithObjects:
@(Custom_Message_Sub_Room_Play_Dating_Pick_Heart),
@(Custom_Message_Sub_Room_Play_Dating_Result_Mutual),
@(Custom_Message_Sub_Room_Play_Dating_Result_Not_Mutual),
nil],
@(CustomMessageType_Noble_VIP):
[NSSet setWithObjects:
@(Custom_Message_Sub_Room_Open_Noble_VIP),
@(Custom_Message_Sub_Room_Noble_LevelUp),
@(Custom_Message_Sub_AllRoom_Noble_LevelUp_Suspend),
nil],
@(CustomMessageType_Face): @(CustomMessageType_Face):
[NSSet setWithObjects: [NSSet setWithObjects:
@(Custom_Message_Sub_Face_Send), @(Custom_Message_Sub_Face_Send),
nil], nil],
@(CustomMessageType_Anchor_FansTeam):
[NSSet setWithObjects:
@(Custom_Message_Sub_FansTeam_Open_Success),
@(Custom_Message_Sub_FansTeam_Open_Fail),
@(Custom_Message_Sub_FansTeam_Join_Success),
@(Custom_Message_Sub_FansTeam_Out_Success),
nil],
@(CustomMessageType_Hall_Super_Admin):
[NSSet setWithObjects:
@(Custom_Message_Sub_Hall_Super_Admin_Kick_Manager_Out_Room),
nil],
@(CustomMessageType_Tarot):
[NSSet setWithObjects:
@(Custom_Message_Sub_Tarot),
nil],
@(CustomMessageType_Room_PK):
[NSSet setWithObjects:
@(Custom_Message_Sub_Room_PK_Manager_Up_Mic),
@(Custom_Message_Sub_Room_PK_Mode_Close),
@(Custom_Message_Sub_Room_PK_Result),
@(Custom_Message_Sub_Room_PK_Mode_Open),
@(Custom_Message_Sub_Room_PK_Start),
@(Custom_Message_Sub_Room_PK_Re_Start),
nil],
@(CustomMessageType_LuckyBag):
[NSSet setWithObjects:
@(Custom_Message_Sub_Room_Gift_LuckBag_Server),
nil],
@(CustomMessageType_Gift_Compound):
[NSSet setWithObjects:@(Custom_Message_Sub_Gift_Compound),
nil],
@(CustomMessageType_Room_Sailing):
[NSSet setWithObjects:
@(Custom_Message_Sub_Sailing_Me),
@(Custom_Message_Sub_Sailing_InRoom),
@(Custom_Message_Sub_Sailing_AllRoom),
@(Custom_Message_Sub_Sailing_AllRoom_Notify),
@(Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend),
nil],
@(CustomMessageType_RedPacket):
[NSSet setWithObjects:
@(Custom_Message_Sub_OpenRedPacketSuccess),
nil],
@(CustomMessageType_Wish_Gift):
[NSSet setWithObjects:
@(Custom_Message_Sub_Wish_Gift_Finish),
nil],
@(CustomMessageType_Starred_Kitchen):
[NSSet setWithObjects:
@(Custom_Message_Sub_Starred_Kitchen_Banner_Dynamic),
@(Custom_Message_Sub_Starred_Kitchen_Banner_Static),
nil],
}; };
} }
@end @end

View File

@@ -6,7 +6,7 @@
// //
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
@class NIMMessage, YMMessageInfoModel; @class NIMMessage, YMMessageInfoModel;
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSString *)parseMessageBubble:(NIMMessage *)message; - (NSString *)parseMessageBubble:(NIMMessage *)message;
///房间的代理 ///房间的代理
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate; @property (nonatomic,weak) id<CHRoomHostDelegate> hostDelegate;
@end @end

View File

@@ -51,71 +51,26 @@
NSString * uid = [AccountInfoStorage instance].getUid; NSString * uid = [AccountInfoStorage instance].getUid;
messageInfo.isShowAvatar = YES; messageInfo.isShowAvatar = YES;
messageInfo.uid = message.from; messageInfo.uid = message.from;
NIMUser * user = [[NIMSDK sharedSDK].userManager userInfo:message.from];
// if (user) {
// messageInfo.avatarUrl = user.userInfo.avatarUrl.length > 0 ? user.userInfo.avatarUrl : user.userInfo.thumbAvatarUrl;
// }
// if (messageInfo.avatarUrl.length <= 0) {
// NIMMessageChatroomExtension * ext = message.messageExt;
// messageInfo.avatarUrl = ext.roomAvatar;
// }
YMMessageRemoteExtModel * model = [YMMessageRemoteExtModel modelWithJSON:message.remoteExt[message.from]];
// messageInfo.bubbleImageUrl = [self parseMessageBubble:message];
NSString * nick = [NSString stringWithFormat:@"%@:", ((NIMMessageChatroomExtension *)message.messageExt).roomNickname]; NSString * nick = [NSString stringWithFormat:@"%@:", ((NIMMessageChatroomExtension *)message.messageExt).roomNickname];
if ([message.from isEqualToString:uid]) { if ([message.from isEqualToString:uid]) {
nick = @"我:"; nick = @"我:";
} }
//
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
// if (model.vipIcon) {//icon
// [attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(26, 26)]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// }
//
NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init]; NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
paraStyle.lineSpacing = 2.0f;// paraStyle.lineSpacing = 2.0f;//
// // () // // ()
paraStyle.alignment = NSTextAlignmentLeft; paraStyle.alignment = NSTextAlignmentLeft;
paraStyle.baseWritingDirection = NSWritingDirectionLeftToRight; paraStyle.baseWritingDirection = NSWritingDirectionLeftToRight;
NSMutableAttributedString *nameAtt = [self createTextAttribute:nick color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]; NSMutableAttributedString *nameAtt = [self createTextAttribute:nick color:[ThemeColor messageDefaultTextColor] font:kRoomMessageTextFont];
nameAtt.yy_paragraphStyle = paraStyle; nameAtt.yy_paragraphStyle = paraStyle;
[attribute appendAttributedString:nameAtt]; [attribute appendAttributedString:nameAtt];
// [attribute appendAttributedString:[self createTextAttribute:@"\n" color:[UIColor clearColor] font:kRoomMessageDefalutFont]];
//
// ///
// [attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser fromSayHelloChannel:model.fromSayHelloChannel]];
// if ([self isCurrentRoomSuperAdmin:message.from]) {
// [attribute appendAttributedString:[self createLocalImageAttribute:@"common_super_admin"]];
// }
// if (model.experUrl) {
// [attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// }
// if (model.charmUrl) {
// [attribute appendAttributedString:[self createUrlImageAttribute:model.charmUrl]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// }
// if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //
// [attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// } else if (model.inRoomNameplatePic.length > 0) {//
// [attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic size:CGSizeMake(18, 18)]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// }
// [attribute appendAttributedString:[self createTextAttribute:@"\n" color:[UIColor clearColor] font:kRoomMessageDefalutFont]];
//
// [attribute appendAttributedString:[self createSapceAttributeWithHeight:40]];
// id nickNameNifo = message.remoteExt[@"atNames"];
NSMutableAttributedString *msgStr; NSMutableAttributedString *msgStr;
if (message.text) { if (message.text) {
msgStr = [[NSMutableAttributedString alloc] initWithString:message.text]; msgStr = [[NSMutableAttributedString alloc] initWithString:message.text];
// attribute.yy_color = UIColor.whiteColor;
msgStr.yy_color = UIColor.whiteColor; msgStr.yy_color = UIColor.whiteColor;
// [self createUrlImageAttribute:model.iosBubbleUrl text:message.text nickNameNifo:nickNameNifo];
[attribute appendAttributedString:msgStr]; [attribute appendAttributedString:msgStr];
} }
// [self attributeAddLongPressHihtLight:attribute uid:message.from nick:((NIMMessageChatroomExtension *)message.messageExt).roomNickname];
//
messageInfo.content = attribute; messageInfo.content = attribute;
return messageInfo; return messageInfo;
} }
@@ -141,74 +96,24 @@
if (giftInfo == nil) { if (giftInfo == nil) {
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo:info.giftId]; giftInfo = [[YMGiftStorage shareStorage] findGiftInfo:info.giftId];
} }
///
// [attribute appendAttributedString:[self createOfficalAndNewuserAttribute:sendInfo.defUser newUser:sendInfo.newUser fromSayHelloChannel:sendInfo.fromSayHelloChannel]];
//nick
[attribute appendAttributedString:[self createNickAtrribute:info.nick uid:info.uid.integerValue]];
[attribute appendAttributedString:[self createSapceAttribute:2]];;
if (attachment.second == Custom_Message_Sub_Gift_LuckySend) {
//action
[attribute appendAttributedString:[self createTextAttribute:@"送出" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
//
[attribute appendAttributedString:[self createTextAttribute:info.giftName color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:@"给" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; //nick
//target [attribute appendAttributedString:[self createSapceAttribute:2]];;
// [attribute appendAttributedString:[self createNickAtrribute:info.luckyGiftList.user.nick uid:info.luckyGiftList.user.uid]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
//lucky
[attribute appendAttributedString:[self createTextAttribute:@"爆出了" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
// [info.luckyGiftList.giftList enumerateObjectsUsingBlock:^(GiftListsInfo * _Nonnull giftListInfo, NSUInteger idx, BOOL * _Nonnull stop) {
// GiftInfoModel *luckyGiftInfo = [[YMGiftStorage shareStorage] findGiftInfo:[NSString stringWithFormat:@"%ld", giftListInfo.giftId]];
// //
// [attribute appendAttributedString: [self createTextAttribute:@"价值" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// //
// [attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%ld",(NSInteger)luckyGiftInfo.goldPrice] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
// //
// [attribute appendAttributedString: [self createTextAttribute:@"钻石的礼物" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
// //img
// [attribute appendAttributedString:[self createUrlImageAttribute:luckyGiftInfo.giftUrl]];
// [attribute appendAttributedString:[self createSapceAttribute:2]];
// //x N
// [attribute appendAttributedString:[self createTextAttribute: [NSString stringWithFormat:@" X%ld",giftListInfo.giftNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
// if (info.luckyGiftList.giftList.count-1 != idx) {
// //,
// [attribute appendAttributedString: [self createTextAttribute:@"," color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
// }
// }];
} else {
// //
[attribute appendAttributedString:[self createTextAttribute:@" 打赏 " color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createTextAttribute:@" 打赏 " color:[ThemeColor messageDefaultTextColor] font:kRoomMessageTextFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
//target //target
[attribute appendAttributedString: [self createNickAtrribute:info.targetNick uid:info.targetUid.integerValue]];
[attribute appendAttributedString:[self createSapceAttribute:2]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
//img //img
[attribute appendAttributedString:[self createUrlImageAttribute:giftInfo.giftUrl]]; [attribute appendAttributedString:[self createUrlImageAttribute:giftInfo.giftUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]]; [attribute appendAttributedString:[self createSapceAttribute:2]];
//x N //x N
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@" X%ld",info.giftNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@" X%ld",info.giftNum] color:[ThemeColor messageTextColor] font:kRoomMessageTextFont]];
}
messageInfo.content = attribute; messageInfo.content = attribute;
return messageInfo; return messageInfo;
} }
///
- (NSMutableAttributedString *)createNickAtrribute:(NSString *)nick uid:(NSInteger)uid {
NSMutableAttributedString * attribute = [self createTextAttribute:nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont];
[self attributeAddHihtLight:attribute uid:uid];
return attribute;
}
- (void)attributeAddHihtLight:(NSMutableAttributedString *)attribute uid:(NSInteger)uid {
@kWeakify(self);
[attribute yy_setTextHighlightRange:NSMakeRange(0, attribute.length) color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
@kStrongify(self);
if (uid <= 0) {return;}
// [self showUserCard:uid];
}];
}
#pragma mark - NSMutableAttributedString #pragma mark - NSMutableAttributedString
/// ///

View File

@@ -6,14 +6,14 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
#import "RoomGuestDelegate.h" #import "CHRoomGuestDelegate.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface YMRoomMessageContainerView : UIView<RoomGuestDelegate> @interface YMRoomMessageContainerView : UIView<CHRoomGuestDelegate>
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate; - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -8,7 +8,7 @@
#import "YMRoomMessageContainerView.h" #import "YMRoomMessageContainerView.h"
/// View /// View
#import "MewRoomMessageTableCell.h" #import "MewRoomMessageTableCell.h"
#import "XPRoomMessageHeaderView.h" #import "CHRoomMessageHeaderView.h"
/// Model /// Model
#import "YMMessageInfoModel.h" #import "YMMessageInfoModel.h"
#import "AttachmentModel.h" #import "AttachmentModel.h"
@@ -28,21 +28,17 @@
@interface YMRoomMessageContainerView() <UITableViewDelegate, UITableViewDataSource> @interface YMRoomMessageContainerView() <UITableViewDelegate, UITableViewDataSource>
/// ///
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate; @property (nonatomic,weak) id<CHRoomHostDelegate> hostDelegate;
@property (nonatomic, strong) UITableView *messageTableView; @property (nonatomic, strong) UITableView *messageTableView;
/// ///
@property (nonatomic,strong) NSMutableArray<YMMessageInfoModel *> *datasource; @property (nonatomic,strong) NSMutableArray<YMMessageInfoModel *> *datasource;
/// ///
@property (nonatomic,strong) NSMutableArray<NIMMessage *> *incomingMessages; @property (nonatomic,strong) NSMutableArray<NIMMessage *> *incomingMessages;
///
@property (nonatomic,strong) UIButton *messageTipsBtn;
///
@property (nonatomic,assign) BOOL isPending;
///messageView TODO: ///messageView TODO:
@property (nonatomic,strong) YMRoomMessageParser *messageParser; @property (nonatomic,strong) YMRoomMessageParser *roomMessageParser;
/// ///
@property (nonatomic,strong) XPRoomMessageHeaderView *headerView; @property (nonatomic,strong) CHRoomMessageHeaderView *headerView;
@end @end
@implementation YMRoomMessageContainerView @implementation YMRoomMessageContainerView
@@ -51,7 +47,7 @@
} }
#pragma mark - Init #pragma mark - Init
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate { - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
self = [super init]; self = [super init];
if (self) { if (self) {
self.hostDelegate = delegate; self.hostDelegate = delegate;
@@ -62,83 +58,39 @@
} }
#pragma mark - RoomGuestDelegate #pragma mark - CHRoomGuestDelegate
- (void)handleNIMTextMessage:(NIMMessage *)message { - (void)handleNIMTextMessage:(NIMMessage *)message {
[self addRoomMessage:message]; [self addCurrentRoomMessage:message];
} }
- (void)handleNIMNotificationMessage:(NIMMessage *)message { - (void)handleNIMNotificationMessage:(NIMMessage *)message {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject; NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content; NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
if (content.eventType == NIMChatroomEventTypeEnter) { if (content.eventType == NIMChatroomEventTypeEnter) {
// if (roomInfo.isCloseScreen) {
// AttachmentModel *attachement = [[AttachmentModel alloc]init];
// attachement.first = CustomMessageType_Update_RoomInfo;
// attachement.second = Custom_Message_Sub_Update_RoomInfo_MessageState;
// attachement.data = @{@"roomInfo":self.hostDelegate.getRoomInfo.model2dictionary};
// NIMMessage *message = [[NIMMessage alloc]init];
// NIMCustomObject *object = [[NIMCustomObject alloc] init];
// object.attachment = attachement;
// message.messageObject = object;
// [self addRoomMessage:message];
// return;
// } else {
NIMChatroomNotificationMember *member = content.targets[0]; NIMChatroomNotificationMember *member = content.targets[0];
if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) { if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
/// ///
[self handleFetchHistoryMessage:message]; [self handleFetchHistoryMessage:message];
} else { } else {
// BOOL hideEnter = [self handleHideEnter:message];
// if (!hideEnter) {
/// ///
[self addRoomMessage:message]; [self addCurrentRoomMessage:message];
// }
} }
// }
} else if(content.eventType == NIMChatroomEventTypeInfoUpdated) {
// if (roomInfo.isCloseScreen) {return;}
// if (roomInfo.datingState == RoomDatingStateChangeType_Open) {
// NSString * uid = [AccountInfoStorage instance].getUid;
// 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 (error == nil) {
// NIMChatroomMember * member = members.firstObject;
// BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
// BOOL isManager = member.type == NIMChatroomMemberTypeManager;
// if (isCreator || isManager) {
// [self addRoomMessage:message];
// }
// }
// }];
// }
} }
} }
- (void)handleNIMCustomMessage:(NIMMessage *)message { - (void)handleNIMCustomMessage:(NIMMessage *)message {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
}
if ([self isCanDisplayMessage:message]) { if ([self isCanDisplayMessage:message]) {
[self addRoomMessage:message]; [self addCurrentRoomMessage:message];
} }
} }
- (void)handleFetchHistoryMessage:(NIMMessage *)message { - (void)handleFetchHistoryMessage:(NIMMessage *)message {
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; NSString *roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInformation.roomId];
NSString *roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
NIMHistoryMessageSearchOption *option = [[NIMHistoryMessageSearchOption alloc] init]; NIMHistoryMessageSearchOption *option = [[NIMHistoryMessageSearchOption alloc] init];
option.limit = [ClientConfig shareConfig].configInfo.roomMessageCount; option.limit = [ClientConfig shareConfig].configInfo.roomMessageCount;
option.startTime = self.hostDelegate.getRoomInfo.clearScreenTime / 1000.0; option.startTime = self.hostDelegate.getRoomInformation.clearScreenTime / 1000.0;
option.order = NIMMessageSearchOrderAsc; option.order = NIMMessageSearchOrderAsc;
option.messageTypes = @[@(NIMMessageTypeText)]; option.messageTypes = @[@(NIMMessageTypeText)];
[[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray<NIMMessage *> * _Nullable messages) { [[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray<NIMMessage *> * _Nullable messages) {
@@ -157,33 +109,13 @@
} }
// //
for (NIMMessage *item in messages.reverseObjectEnumerator) { for (NIMMessage *item in messages.reverseObjectEnumerator) {
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]]; [self.datasource addObject:[self.roomMessageParser parseMessageAttribute:item]];
// if (!self.isMiniEnter) {///
// if (self.hostDelegate.getRoomInfo.isCloseScreen) {
// NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
// if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
// AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
// if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
// }
// }
// } else {
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
// }
// }
} }
[self.messageTableView reloadData]; [self.messageTableView reloadData];
// //
[self scrollToBottom:YES]; [self scrollToBottomAnimated:YES];
// BOOL hideEnter = [self handleHideEnter:message];
// if (!hideEnter) {
/// ///
[self addRoomMessage:message]; [self addCurrentRoomMessage:message];
// }
// if (!roomInfo.hasAnimationEffect) {
// [self roomInfoNoGiftAnimationMessage:message];
// }
// [self createUserEnterRoomAddRoomtopicMessage];
}]; }];
return; return;
} }
@@ -194,52 +126,26 @@
} }
// //
for (NIMMessage *item in messages) { for (NIMMessage *item in messages) {
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]]; [self.datasource addObject:[self.roomMessageParser parseMessageAttribute:item]];
// if (!self.isMiniEnter) {///
// if (self.hostDelegate.getRoomInfo.isCloseScreen) {
// NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
// if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
// AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
// if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
// }
// }
// } else {
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
// }
// }
} }
[self.messageTableView reloadData]; [self.messageTableView reloadData];
// //
[self scrollToBottom:YES]; [self scrollToBottomAnimated:YES];
} }
// BOOL hideEnter = [self handleHideEnter:message];
// if (!hideEnter) {
// ///
// [self addRoomMessage:message];
// }
// if (!roomInfo.hasAnimationEffect) {
// [self roomInfoNoGiftAnimationMessage:message];
// }
// [self createUserEnterRoomAddRoomtopicMessage];
}]; }];
} }
#pragma mark - Private Method #pragma mark - Private Method
/// ///
- (void)addRoomMessage:(NIMMessage *)message { - (void)addCurrentRoomMessage:(NIMMessage *)message {
[self.incomingMessages addObject:message]; [self.incomingMessages addObject:message];
if (self.isPending) { [self appendScrollToBottom];
self.messageTipsBtn.hidden = NO;
} else {
[self appendAndScrollToBottom];
}
} }
/// ///
- (void)appendAndScrollToBottom { - (void)appendScrollToBottom {
if (self.incomingMessages.count < 1) { if (self.incomingMessages.count < 1) {
[self scrollToBottom:YES]; [self scrollToBottomAnimated:YES];
return; return;
} }
@@ -251,8 +157,8 @@
NSMutableArray *indexPaths = [NSMutableArray array]; NSMutableArray *indexPaths = [NSMutableArray array];
for (NIMMessage *item in self.incomingMessages) { for (NIMMessage *item in self.incomingMessages) {
if ([self.messageParser parseMessageAttribute:item] != nil) { if ([self.roomMessageParser parseMessageAttribute:item] != nil) {
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]]; [self.datasource addObject:[self.roomMessageParser parseMessageAttribute:item]];
[indexPaths addObject:[NSIndexPath indexPathForRow:self.datasource.count - 1 inSection:0]]; [indexPaths addObject:[NSIndexPath indexPathForRow:self.datasource.count - 1 inSection:0]];
} }
@@ -262,7 +168,7 @@
} }
/// ///
- (void)scrollToBottom:(BOOL)animated { - (void)scrollToBottomAnimated:(BOOL)animated {
NSInteger s = [self.messageTableView numberOfSections]; // NSInteger s = [self.messageTableView numberOfSections]; //
if (s<1) return; if (s<1) return;
NSInteger r = [self.messageTableView numberOfRowsInSection:s-1]; // NSInteger r = [self.messageTableView numberOfRowsInSection:s-1]; //
@@ -277,26 +183,12 @@
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel *attachment = (AttachmentModel *)obj.attachment; AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_Face && attachment.second == Custom_Message_Sub_Face_Send) {
if ([attachment.data[@"data"] isKindOfClass:[NSArray class]]) {
// NSArray * array = [RoomFaceSendInfoModel modelsWithArray:attachment.data[@"data"]];
// for (int i = 0; i< array.count; i++) {
// RoomFaceSendInfoModel * sendInfo = [array safeObjectAtIndex1:i];
// if (sendInfo.resultIndexes.count <=0) {
// return NO;
// }
// }
}
}
return [[[YMRoomMessageFilter supportMessageDic] objectForKey:@(attachment.first)] containsObject:@(attachment.second)]; return [[[YMRoomMessageFilter supportMessageDic] objectForKey:@(attachment.first)] containsObject:@(attachment.second)];
} }
return NO; return NO;
} }
- (void)onRoomEntered { - (void)onRoomEntered {
// [[XPRoomMiniManager shareManager] resetLocalMessage];
self.headerView.bubbleColor = [ThemeColor messageBubbleColor]; self.headerView.bubbleColor = [ThemeColor messageBubbleColor];
} }
@@ -380,17 +272,17 @@
return _incomingMessages; return _incomingMessages;
} }
- (YMRoomMessageParser *)messageParser { - (YMRoomMessageParser *)roomMessageParser {
if (!_messageParser) { if (!_roomMessageParser) {
_messageParser = [[YMRoomMessageParser alloc] init]; _roomMessageParser = [[YMRoomMessageParser alloc] init];
_messageParser.hostDelegate = self.hostDelegate; _roomMessageParser.hostDelegate = self.hostDelegate;
} }
return _messageParser; return _roomMessageParser;
} }
- (XPRoomMessageHeaderView *)headerView { - (CHRoomMessageHeaderView *)headerView {
if (!_headerView) { if (!_headerView) {
_headerView = [[XPRoomMessageHeaderView alloc] init]; _headerView = [[CHRoomMessageHeaderView alloc] init];
} }
return _headerView; return _headerView;
} }

View File

@@ -11,20 +11,20 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/** 麦序数据的协议。 /** 麦序数据的协议。
RoomVC 的子 View 之间的通信协议,通过 RoomHostDelegate 和 RoomGuestDelegate 继承实现。 RoomVC 的子 View 之间的通信协议,通过 CHRoomHostDelegate 和 CHRoomGuestDelegate 继承实现。
调用方向: 调用方向:
- getMicroQueueRoomVC 子 View ---> RoomHostDelegate ---> StageView - getCustomMicroQueueRoomVC 子 View ---> CHRoomHostDelegate ---> StageView
- onMicroQueueUpdateStageView ---> RoomHostDelegate ---> RoomVC 子 View - microQueueUpdateStageView ---> CHRoomHostDelegate ---> RoomVC 子 View
*/ */
@protocol MicroQueueProtocol <NSObject> @protocol MicroQueueProtocol <NSObject>
@optional @optional
/// 获取麦序 /// 获取麦序
- (NSMutableDictionary<NSString *, MicroQueueModel *> *)getMicroQueue; - (NSMutableDictionary<NSString *, MicroQueueModel *> *)getCustomMicroQueue;
/// 麦序更新通知 /// 麦序更新通知
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *, MicroQueueModel *> *)queue; - (void)microQueueUpdate:(NSMutableDictionary<NSString *, MicroQueueModel *> *)queue;
@end @end

View File

@@ -1,25 +0,0 @@
//
// RoomAnimationProtocol.h
// yinmeng-ios
//
// Created by 触海 on 2023/11/21.
//
#import <Foundation/Foundation.h>
/** XPRoomAnimationView 用到的协议。
RoomVC 的子 View 之间的通信协议,通过 RoomHostDelegate 和 RoomGuestDelegate 继承实现。
调用方向XPRoomAnimationView —> RoomHostDelegate —> RoomAnimationProtocolRoomGuestDelegate继承
*/
@protocol RoomAnimationProtocol <NSObject>
@optional
/**
* StageView 专用。
*/
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid;
@end
//NS_ASSUME_NONNULL_END

View File

@@ -1,32 +0,0 @@
//
// RoomHostDelegate.h
// mew-ios
//
// Created by 触海 on 2023/11/13.
//
#import <UIKit/UIKit.h>
#import "MicroQueueProtocol.h"
#import "RoomAnimationProtocol.h"
@class RoomInfoModel, UserInfoModel;
NS_ASSUME_NONNULL_BEGIN
@protocol RoomHostDelegate <NSObject, MicroQueueProtocol,RoomAnimationProtocol>
// 获取房间信息
- (RoomInfoModel *)getRoomInfo;
// 获取用户信息
- (UserInfoModel *)getUserInfo;
/// 退出房间
- (void)exitRoom;
/// 最小化房间
- (void)miniRoom;
/// 获取当前的导航控制器
- (UINavigationController *)getCurrentNav;
@end
NS_ASSUME_NONNULL_END

View File

@@ -6,8 +6,8 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "RoomGuestDelegate.h" #import "CHRoomGuestDelegate.h"
#import "RoomHostDelegate.h" #import "CHRoomHostDelegate.h"
#import "MicroViewProtocol.h" #import "MicroViewProtocol.h"
@class MicroQueueModel; @class MicroQueueModel;
@@ -62,10 +62,10 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
@interface StageView : UIView <StageViewDelegate, StageViewProtocol, RoomGuestDelegate> @interface CHStageView : UIView <StageViewDelegate, StageViewProtocol, CHRoomGuestDelegate>
@property (nonatomic, weak, readonly) id<RoomHostDelegate> hostDelegate; @property (nonatomic, weak, readonly) id<CHRoomHostDelegate> hostDelegate;
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate; - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
@property (nonatomic, strong, readonly) NSString *selectUid; @property (nonatomic, strong, readonly) NSString *selectUid;

View File

@@ -5,7 +5,7 @@
// Created by on 2023/11/13. // Created by on 2023/11/13.
// //
#import "StageView.h" #import "CHStageView.h"
/// Tool /// Tool
#import "NSArray+Safe.h" #import "NSArray+Safe.h"
#import "RtcManager.h" #import "RtcManager.h"
@@ -25,7 +25,7 @@
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@interface StageView()<RtcDelegate> @interface CHStageView()<RtcDelegate>
/** position index /** position index
* position -1 * position -1
* - 使MicroStateModelself.micQueue. * - 使MicroStateModelself.micQueue.
@@ -41,7 +41,7 @@
/// ///
@property (nonatomic, strong) NSMutableDictionary<NSString *, MicroQueueModel *> *micQueue; @property (nonatomic, strong) NSMutableDictionary<NSString *, MicroQueueModel *> *micQueue;
@property (nonatomic, weak) id<RoomHostDelegate> hostDelegate; @property (nonatomic, weak) id<CHRoomHostDelegate> hostDelegate;
/** /**
* *
@@ -58,10 +58,10 @@
@end @end
@implementation StageView @implementation CHStageView
#pragma mark - Init #pragma mark - Init
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate { - (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
self = [super initWithFrame:CGRectZero]; self = [super initWithFrame:CGRectZero];
if (self) { if (self) {
_hostDelegate = delegate; _hostDelegate = delegate;
@@ -69,7 +69,6 @@
for (int i = 0; i < microCount; i++) { for (int i = 0; i < microCount; i++) {
UIView *microView = [self microViewForIndex:i]; UIView *microView = [self microViewForIndex:i];
if (microView) { if (microView) {
// microView.backgroundColor = UIColor.redColor;
microView.tag = i; microView.tag = i;
microView.frame = [self rectForViewAtIndex:i]; microView.frame = [self rectForViewAtIndex:i];
[self addSubview:microView]; [self addSubview:microView];
@@ -82,7 +81,7 @@
make.height.mas_equalTo(self.heightForStageView); make.height.mas_equalTo(self.heightForStageView);
}]; }];
if (_hostDelegate.getRoomInfo) { if (_hostDelegate.getRoomInformation) {
[self initRtc]; [self initRtc];
[self initNimMicroQueues]; [self initNimMicroQueues];
} else { } else {
@@ -100,7 +99,7 @@
* init self initWithSelegateself onRoomEntered * init self initWithSelegateself onRoomEntered
*/ */
- (void)initRtc { - (void)initRtc {
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
// RTRC // RTRC
NSInteger roomId = roomInfo.roomId > INT_MAX ? roomInfo.uid : roomInfo.roomId; NSInteger roomId = roomInfo.roomId > INT_MAX ? roomInfo.uid : roomInfo.roomId;
[RtcManager initEngineWithType:RtcEngineType_TRTC delegate:self]; [RtcManager initEngineWithType:RtcEngineType_TRTC delegate:self];
@@ -109,21 +108,8 @@
/// ///
- (void)initNimMicroQueues { - (void)initNimMicroQueues {
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
// self.micQueue. [self fetchChatroomNIM];
[[NIMSDK sharedSDK].chatroomManager fetchChatroomInfo:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom) {
if (error) return;
NSDictionary *info = [chatroom.ext toJSONObject];
NSDictionary *micState = [info[@"micQueue"] toJSONObject];
for (NSString *position in micState.allKeys) {
MicroStateModel *state = [MicroStateModel modelWithJSON:micState[position]];
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
sequence.microState = state;
}
[self microQueueUpdated:NO];
}];
self.hadGetQueueInfoSuccess = NO; self.hadGetQueueInfoSuccess = NO;
// self.micQueue // self.micQueue
@@ -140,13 +126,13 @@
} }
} }
[self microQueueUpdated:ownerRTCChange]; [self microQueueUpdated:ownerRTCChange];
[self.hostDelegate onMicroQueueUpdate:self.micQueue]; [self.hostDelegate microQueueUpdate:self.micQueue];
self.hadGetQueueInfoSuccess = YES; self.hadGetQueueInfoSuccess = YES;
}]; }];
} }
#pragma mark - RoomGuestDelegate #pragma mark - CHRoomGuestDelegate
- (void)onRoomEntered { - (void)onRoomEntered {
// self.isMiniEnter = NO; // self.isMiniEnter = NO;
/// @fengshuo /// @fengshuo
@@ -155,13 +141,13 @@
[self initNIMMicroQueues]; [self initNIMMicroQueues];
} }
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getMicroQueue { - (NSMutableDictionary<NSString *,MicroQueueModel *> *)getCustomMicroQueue {
return self.micQueue; return self.micQueue;
} }
- (void)onRoomUpdate { - (void)onRoomUpdate {
// self.isMiniEnter = NO; // self.isMiniEnter = NO;
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel * roomInfo = self.hostDelegate.getRoomInformation;
// for (int i = 0; i < self.countOfMircoView; i++) { // for (int i = 0; i < self.countOfMircoView; i++) {
// UIView<MicroViewProtocol> * view = [self findMicroViewByIndex:i]; // UIView<MicroViewProtocol> * view = [self findMicroViewByIndex:i];
// [view showGiftValueMode:roomInfo.showGiftValue]; // [view showGiftValueMode:roomInfo.showGiftValue];
@@ -217,27 +203,6 @@
if (changeType == 1) { // if (changeType == 1) { //
MicroQueueModel *sequence = [self.micQueue objectForKey:position]; MicroQueueModel *sequence = [self.micQueue objectForKey:position];
sequence.userInfo = userInfo; sequence.userInfo = userInfo;
// if (self.hostDelegate.getRoomInfo.showGiftValue && userInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
// RoomInfoModel * roomInfo =self.hostDelegate.getRoomInfo;
// NSString * roomUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
// NSString * uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
// [Api roomGiftValueUpMic:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
// if (code == 200) {
// NIMMessage * message = [[NIMMessage alloc] init];
// AttachmentModel * attachMent = [[AttachmentModel alloc] init];
// attachMent.first = CustomMessageType_Room_GiftValue;
// attachMent.second = Custom_Message_Sub_Room_GiftValue_Sync;
// attachMent.data = data.data;
// NIMCustomObject *object = [[NIMCustomObject alloc] init];
// object.attachment = attachMent;
// message.messageObject = object;
// //
// NSString * sessionId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
// NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
// [[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
// }
// } roomUid:roomUid micUid:uid position:position uid:uid];
// }
// //
if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) { if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) {
[RtcManager instance].localMuted = NO; [RtcManager instance].localMuted = NO;
@@ -245,10 +210,6 @@
} }
microQueueChanged = YES; microQueueChanged = YES;
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
// ///💣
// [self initGiftValue];
// }
} }
break; break;
case NIMChatroomEventTypeExit: case NIMChatroomEventTypeExit:
@@ -262,10 +223,6 @@
} }
} }
} }
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
// ///💣
// [self initGiftValue];
// }
} }
break; break;
case NIMChatroomEventTypeQueueBatchChange: case NIMChatroomEventTypeQueueBatchChange:
@@ -281,10 +238,6 @@
} }
} }
} }
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
// ///💣
// [self initGiftValue];
// }
} }
} }
@@ -294,9 +247,8 @@
} }
if (microQueueChanged) { if (microQueueChanged) {
// self.isMiniEnter = NO;
[self microQueueUpdated:ownerRTCChanged]; [self microQueueUpdated:ownerRTCChanged];
[self.hostDelegate onMicroQueueUpdate:self.micQueue]; [self.hostDelegate microQueueUpdate:self.micQueue];
} }
} }
@@ -304,71 +256,7 @@
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel *attachment = (AttachmentModel *)obj.attachment; AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
if(attachment.first == CustomMessageType_Room_GiftValue && attachment.second == Custom_Message_Sub_Room_GiftValue_Sync) {
[self giftValueUpdate:attachment.data];
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
// ///💣
// [self initGiftValue];
// }
} else if(attachment.first == CustomMessageType_Gift && (attachment.second == Custom_Message_Sub_Gift_Send)) {
[self giftValueUpdate:attachment.data];
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
// ///💣
// [self initGiftValue];
// }
} }
// else if(attachment.first == CustomMessageType_AllMicroSend && (attachment.second == Custom_Message_Sub_AllMicroSend || attachment.second == Custom_Message_Sub_AllBatchSend || attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend)) {
// [self giftValueUpdate:attachment.data];
//// if (self.hostDelegate.getRoomInfo.showGiftValue) {
//// ///💣
//// [self initGiftValue];
//// };
// }
else if (attachment.first == CustomMessageType_Face && attachment.second == Custom_Message_Sub_Face_Send) { //
// [self showUserFace:attachment.data];
}
// else if (attachment.first == CustomMessageType_Room_PK && attachment.second == Custom_Message_Sub_Room_PK_Manager_Up_Mic) {
// NSDictionary * dic = attachment.data;
// ///
// NSString * uid = [AccountInfoStorage instance].getUid;
// if (dic.allKeys.count > 0 && [dic.allKeys containsObject:uid] && [dic objectForKey:uid]) {
//// RoomPKChooseUserModel * pkUserInfo = [RoomPKChooseUserModel modelWithDictionary:[dic objectForKey:uid]];
// NSString * position = @"";
//// [NSString stringWithFormat:@"%d", pkUserInfo.position];
// NSString* roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
// MicroQueueModel *micro = [self.micQueue objectForKey:position];
//// if (micro && micro.userInfo && micro.userInfo.uid != pkUserInfo.uid.integerValue) return;
// UserInfoModel * userInfo = self.hostDelegate.getUserInfo;
// userInfo.groupType = pkUserInfo.groupType;
// NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
// request.key = position;
// NSMutableDictionary *curUserInfo = [[NSMutableDictionary alloc]initWithDictionary:[self userInfoToQueueExt:userInfo]];
// [curUserInfo setValue:@(YES) forKey:@"isNoProhibitMic"];
// request.value = [curUserInfo toJSONString];
// request.roomId = roomId;
// request.transient = YES;
// [[NIMSDK sharedSDK].chatroomManager updateChatroomQueueObject:request completion:^(NSError * _Nullable error) {
// if (error) return;
// }];
// }
// }
}
}
- (void)giftValueUpdate:(NSDictionary *)dic {
// [self resetAllPositionItemGiftValue];
// GiftValueInfoModel * model = [GiftValueInfoModel modelWithDictionary:dic];
// for (int i = 0; i < model.giftValueVos.count; i++) {
// GiftValueDetailModel * giftValueModel = [model.giftValueVos safeObjectAtIndex1:i];
// UIView<MicroViewProtocol> * view = [self findMicroViewByUid:giftValueModel.uid];
// if (self.hostDelegate.getRoomInfo.leaveMode && giftValueModel.uid.integerValue == self.hostDelegate.getRoomInfo.uid) {
// view = [self findMicroViewByIndex:0];
// }
// if (view == nil) continue;
// [view configGiftValue:giftValueModel.giftValue];
// }
// [self updatePostionItemWithRoomOnMicGiftValue:model];
} }
#pragma mark - update views as data changed #pragma mark - update views as data changed
@@ -378,20 +266,15 @@
*/ */
- (void)microQueueUpdated:(BOOL)isHandleRTC { - (void)microQueueUpdated:(BOOL)isHandleRTC {
BOOL selfNeedBroadcast = NO; BOOL selfNeedBroadcast = NO;
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
BOOL leaveMode = roomInfo.leaveMode; BOOL leaveMode = roomInfo.leaveMode;
NSMutableArray *statisMicArray = [NSMutableArray array]; NSMutableArray *statisMicArray = [NSMutableArray array];
for (UIView<MicroViewProtocol> *view in self.microViews) { for (UIView<MicroViewProtocol> *view in self.microViews) {
// if ([view isMemberOfClass:[MewSocialStageView Class]]) {
view.layer.borderColor = UIColor.clearColor.CGColor; view.layer.borderColor = UIColor.clearColor.CGColor;
view.layer.borderWidth = 0.0; view.layer.borderWidth = 0.0;
self.selectUid = @""; self.selectUid = @"";
self.isSelectMicUser = NO; self.isSelectMicUser = NO;
// [self getMewMicroSelectUid];
// }
} }
@@ -402,15 +285,13 @@
[view configRoomInfo:roomInfo]; [view configRoomInfo:roomInfo];
[view configMicQueue:self.micQueue]; [view configMicQueue:self.micQueue];
[view configMicroView:model]; [view configMicroView:model];
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) { if (self.hostDelegate.getUserInformation.uid && model.userInfo.uid == self.hostDelegate.getUserInformation.uid) {
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open; selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
} }
if (model.microState.micState == MicroMicStateType_Close) { if (model.microState.micState == MicroMicStateType_Close) {
[RtcManager instance].localMuted = YES; [RtcManager instance].localMuted = YES;
} }
// [view showLeaveMode:(i == 0 && leaveMode)];
} }
if (!isHandleRTC) { if (!isHandleRTC) {
@@ -449,15 +330,14 @@
- (void)didSelectAtIndex:(NSInteger)index { - (void)didSelectAtIndex:(NSInteger)index {
MicroQueueModel* micModel = [self.micQueue objectForKey:[self indexToPosition:index]]; MicroQueueModel* micModel = [self.micQueue objectForKey:[self indexToPosition:index]];
UserInfoModel* userInfo = self.hostDelegate.getUserInfo; UserInfoModel* userInfo = self.hostDelegate.getUserInformation;
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel* roomInfo = self.hostDelegate.getRoomInformation;
NSString* position = [self indexToPosition:index]; NSString* position = [self indexToPosition:index];
NSString* uid = [NSString stringWithFormat:@"%ld", userInfo.uid]; NSString* uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
NSString* roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId]; NSString* roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
// 1. // 1.
NSString * targetUid; NSString * targetUid;
if (roomInfo.leaveMode && [position isEqualToString:@"-1"]) { if (roomInfo.leaveMode && [position isEqualToString:@"-1"]) {
targetUid = [NSString stringWithFormat:@"%ld", roomInfo.uid]; targetUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
@@ -479,20 +359,6 @@
UIView<MicroViewProtocol> *selectMicroView = [self findMicroViewByIndex:index]; UIView<MicroViewProtocol> *selectMicroView = [self findMicroViewByIndex:index];
selectMicroView.layer.borderColor = self.isSelectMicUser ? [ThemeColor colorWithHexString:@"#9552FF"].CGColor : UIColor.clearColor.CGColor; selectMicroView.layer.borderColor = self.isSelectMicUser ? [ThemeColor colorWithHexString:@"#9552FF"].CGColor : UIColor.clearColor.CGColor;
selectMicroView.layer.borderWidth = self.isSelectMicUser ? 2.0 : 0.0; selectMicroView.layer.borderWidth = self.isSelectMicUser ? 2.0 : 0.0;
// XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
// model.uid = targetUid;
// model.position = position;
// model.posState = micModel.microState.posState;
// model.micState = micModel.microState.micState;
// model.nick = userInfo.nick;
// model.roomInfo = roomInfo;
// model.micQueue = self.micQueue;
// model.delegate = self.hostDelegate;
// model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
// XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
// [self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
return; return;
} }
@@ -555,7 +421,7 @@
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) { if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
// 2.1.1 // 2.1.1
TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:@"上麦" clickAction:^{ TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:@"上麦" clickAction:^{
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid]; NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInformation.uid];
UIView* microView = [self findMicroViewByUid:selfUid]; UIView* microView = [self findMicroViewByUid:selfUid];
if (microView) { if (microView) {
nimDownQueue([self indexToPosition:microView.tag], position); nimDownQueue([self indexToPosition:microView.tag], position);
@@ -563,62 +429,8 @@
nimUpQueue(position, NO); nimUpQueue(position, NO);
} }
}]; }];
// 2.1.2 /
// NSString * lockTitle;
// if (roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
// lockTitle = micModel.microState.posState == MicroPosStateType_Free ? @"切换为排麦" : @"切换为自由麦";
// }else {
// lockTitle = micModel.microState.posState == MicroPosStateType_Free ? @"锁麦" : @"解锁";
// }
// TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:lockTitle clickAction:^{
// NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
// NSString * state = micModel.microState.posState == MicroPosStateType_Free ? @"1" : @"0";
// NSString * ticket = [[AccountInfoStorage instance] getTicket];
// NSString * uid = [[AccountInfoStorage instance] getUid];
// [Api microLockCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
//
// } roomUid:roomUid state:state position:position ticket:ticket uid:uid];
// }];
// 2.1.3 /
// NSString * muteTitle = micModel.microState.micState == MicroMicStateType_Open ? @"闭麦" : @"开麦";
// TTActionSheetConfig *muteMic = [TTActionSheetConfig normalTitle:muteTitle clickAction:^{
// NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
// NSString * state = micModel.microState.micState == MicroMicStateType_Open ? @"1" : @"0";
// NSString * ticket = [[AccountInfoStorage instance] getTicket];
// NSString * uid = [[AccountInfoStorage instance] getUid];
// [Api microMuteCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
//
// } roomUid:roomUid state:state position:position ticket:ticket uid:uid];
// }];
// Ta
// NSString * inviteTitle = ([position isEqualToString:@"-1"] && roomInfo.roomModeType == RoomModeType_Open_Blind) ? @"抱Ta上麦当主持" : @"抱Ta上麦";
// TTActionSheetConfig *inviteMic = [TTActionSheetConfig normalTitle:inviteTitle clickAction:^{
// XPRoomInviteUserViewController * inviteUserMicVC = [[XPRoomInviteUserViewController alloc] init];
// inviteUserMicVC.isManagerOrOwner = ([position isEqualToString:@"-1"] && roomInfo.roomModeType == RoomModeType_Open_Blind);
// inviteUserMicVC.roomId = roomId;
// inviteUserMicVC.position = position;
// inviteUserMicVC.blindDateVipUid = roomInfo.blindDateVipUid;
// [self.hostDelegate.getCurrentNav pushViewController:inviteUserMicVC animated:YES];
// }];
//
// [TTPopup actionSheetWithItems:@[upMic,inviteMic, lockMic, muteMic]];
} else { } else {
// 2.2 NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInformation.uid];
// if (micModel.microState.posState == MicroPosStateType_Lock) {
// if (roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
// if ([self getIndexByUid:[AccountInfoStorage instance].getUid] != -1) {
// [XCHUDTool showErrorWithMessage:@"你已经在麦上了"];
// } else {
// [XCHUDTool showErrorWithMessage:@"需要排麦才可以上麦哦~"];
// }
// }
// return;
// };
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid];
UIView* microView = [self findMicroViewByUid:selfUid]; UIView* microView = [self findMicroViewByUid:selfUid];
if (microView) { if (microView) {
if (self.isUpingMic) { if (self.isUpingMic) {
@@ -645,7 +457,7 @@
return; return;
} }
for (NSString* uid in uids) { for (NSString* uid in uids) {
if ([RtcManager instance].isLocalMuted && uid.integerValue == self.hostDelegate.getUserInfo.uid) { if ([RtcManager instance].isLocalMuted && uid.integerValue == self.hostDelegate.getUserInformation.uid) {
continue; continue;
} }
UIView<MicroViewProtocol>* microView = [self findMicroViewByUid:uid]; UIView<MicroViewProtocol>* microView = [self findMicroViewByUid:uid];
@@ -723,33 +535,19 @@
extModel.avatar = userInfo.avatar; extModel.avatar = userInfo.avatar;
extModel.uid = userInfo.uid; extModel.uid = userInfo.uid;
extModel.nick = userInfo.nick; extModel.nick = userInfo.nick;
// extModel.headWearUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
// extModel.micCircle = userInfo.micCircle;
extModel.micNickColor = userInfo.micNickColor; extModel.micNickColor = userInfo.micNickColor;
extModel.preventKick = userInfo.userVipInfoVO.preventKick; extModel.preventKick = userInfo.userVipInfoVO.preventKick;
extModel.enterHide = userInfo.userVipInfoVO.enterHide; extModel.enterHide = userInfo.userVipInfoVO.enterHide;
// extModel.groupType = userInfo.groupType;
return [extModel model2dictionary]; return [extModel model2dictionary];
} }
- (void)initNIMMicroQueues { - (void)initNIMMicroQueues {
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo; RoomInfoModel* roomInfo = self.hostDelegate.getRoomInformation;
// self.micQueue // self.micQueue
[[NIMSDK sharedSDK].chatroomManager fetchChatroomInfo:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom) { [self fetchChatroomNIM];
if (error) {
return;
}
NSDictionary *info = (NSDictionary *)[chatroom.ext toJSONObject];
NSDictionary *micState = [info[@"micQueue"] toJSONObject];
for (NSString *position in micState.allKeys) {
MicroStateModel *state = [MicroStateModel modelWithJSON:micState[position]];
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
sequence.microState = state;
}
[self microQueueUpdated: NO];
}];
self.hadGetQueueInfoSuccess = NO; self.hadGetQueueInfoSuccess = NO;
// self.micQueue // self.micQueue
[[NIMSDK sharedSDK].chatroomManager fetchChatroomQueue:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NSArray<NSDictionary<NSString *,NSString *> *> * _Nullable info) { [[NIMSDK sharedSDK].chatroomManager fetchChatroomQueue:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NSArray<NSDictionary<NSString *,NSString *> *> * _Nullable info) {
@@ -765,12 +563,9 @@
} }
} }
[self microQueueUpdated:ownerRTCChange]; [self microQueueUpdated:ownerRTCChange];
[self.hostDelegate onMicroQueueUpdate:self.micQueue]; [self.hostDelegate microQueueUpdate:self.micQueue];
self.hadGetQueueInfoSuccess = YES; self.hadGetQueueInfoSuccess = YES;
}]; }];
//
// [self initGiftValue];
} }
#pragma mark - Action Event #pragma mark - Action Event
@@ -778,6 +573,24 @@
[self didSelectAtIndex:tap.view.tag]; [self didSelectAtIndex:tap.view.tag];
} }
#pragma mark - Private Method
- (void)fetchChatroomNIM {
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
// self.micQueue.
[[NIMSDK sharedSDK].chatroomManager fetchChatroomInfo:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom) {
if (error) return;
NSDictionary *info = [chatroom.ext toJSONObject];
NSDictionary *micState = [info[@"micQueue"] toJSONObject];
for (NSString *position in micState.allKeys) {
MicroStateModel *state = [MicroStateModel modelWithJSON:micState[position]];
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
sequence.microState = state;
}
[self microQueueUpdated:NO];
}];
}
#pragma mark - Get #pragma mark - Get
- (NSMutableArray *)microViews { - (NSMutableArray *)microViews {
if (!_microViews) { if (!_microViews) {

View File

@@ -1,17 +0,0 @@
//
// MicroNobleWaveView.h
// yinmeng-ios
//
// Created by 触海 on 2023/11/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MicroNobleWaveView : UIView
///开始展示声波动画
- (void)startWaveAnimationWithUrl:(NSString *)url;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,93 +0,0 @@
//
// MicroNobleWaveView.m
// yinmeng-ios
//
// Created by on 2023/11/21.
//
#import "MicroNobleWaveView.h"
//SVGA
#import "SVGA.h"
///Third
#import <Masonry/Masonry.h>
#import "YMMacro.h"
@interface MicroNobleWaveView()<SVGAPlayerDelegate>
@property (nonatomic, strong) SVGAImageView *svgDisplayView;
@property (strong, nonatomic) SVGAParser *parser;
//
@property (nonatomic,assign) BOOL isAnimationing;
@end
@implementation MicroNobleWaveView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Public Method
///
- (void)startWaveAnimationWithUrl:(NSString *)url {
if (self.isAnimationing) {
return;
}
@kWeakify(self);
[self.parser parseWithURL:[NSURL URLWithString:url] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
@kStrongify(self);
self.svgDisplayView.loops = 1;
self.svgDisplayView.clearsAfterStop = YES;
self.svgDisplayView.videoItem = videoItem;
self.isAnimationing = YES;
[self.svgDisplayView startAnimation];
} failureBlock:^(NSError * _Nullable error) {
}];
}
///
- (void)stopWaveAnimation {
self.isAnimationing = NO;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.svgDisplayView];
self.svgDisplayView.delegate = self;
}
- (void)initSubViewConstraints {
[self.svgDisplayView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
}
#pragma mark - SVGAPlayerDelegate
- (void)svgaPlayerDidFinishedAnimation:(SVGAPlayer *)player {
[self stopWaveAnimation];
}
- (SVGAImageView *)svgDisplayView {
if (!_svgDisplayView) {
_svgDisplayView = [[SVGAImageView alloc] init];
_svgDisplayView.contentMode = UIViewContentModeScaleAspectFit;
}
return _svgDisplayView;
}
- (SVGAParser *)parser {
if (!_parser) {
_parser = [[SVGAParser alloc]init];
}
return _parser;
}
@end

View File

@@ -1,20 +0,0 @@
//
// MicroWaveView.h
// yinmeng-ios
//
// Created by 触海 on 2023/11/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MicroWaveView : UIView
///开始展示声波动画
- (void)startWaveAnimation;
///结束声波动画
- (void)stopWaveAnimation;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,115 +0,0 @@
//
// MicroWaveView.m
// yinmeng-ios
//
// Created by on 2023/11/21.
//
#import "MicroWaveView.h"
#import <Masonry/Masonry.h>
#import <POP.h>
@interface MicroWaveView ()
//
@property (nonatomic,strong) UIView * firstView;
//
@property (nonatomic,assign) BOOL isAnimationing;
@end
@implementation MicroWaveView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
self.firstView.layer.cornerRadius = self.frame.size.width / 2;
}
#pragma mark - Public Method
///
- (void)startWaveAnimation {
if (self.isAnimationing) {
return;
}
self.isAnimationing = YES;
self.firstView.hidden = NO;
[self animationWithLayer:self.firstView];
}
///
- (void)stopWaveAnimation {
self.isAnimationing = NO;
self.firstView.hidden = YES;
[self.firstView.layer removeAllAnimations];
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.firstView];
self.firstView.hidden = YES;
}
- (void)initSubViewConstraints {
[self.firstView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self);
}];
}
- (void)animationWithLayer:(UIView *)view {
int animtionDura = 1;
POPBasicAnimation *animation2 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerScaleXY];
animation2.beginTime = CACurrentMediaTime();
animation2.duration = animtionDura;
animation2.fromValue = [NSValue valueWithCGSize:CGSizeMake(1.f, 1.f)];
animation2.toValue = [NSValue valueWithCGSize:CGSizeMake(1.4f, 1.4f)];
POPBasicAnimation *animation3 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerOpacity];
animation3.duration = 0.6 * animtionDura;
animation3.beginTime = CACurrentMediaTime();
animation3.fromValue = @1.0;
animation3.toValue = @0.8;
animation3.repeatCount = 1;
animation3.removedOnCompletion = YES;
POPBasicAnimation *animation4 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerOpacity];
animation4.duration = 0.4* animtionDura;
animation4.beginTime = CACurrentMediaTime() + 0.6 * animtionDura;
animation4.fromValue = @0.8;
animation4.toValue = @0.0;
animation4.repeatCount = 1;
animation4.removedOnCompletion = YES;
if (view == self.firstView) {
[animation4 setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
self.isAnimationing = NO;
}];
}
[view.layer pop_addAnimation:animation2 forKey:@"animation2"];
[view.layer pop_addAnimation:animation3 forKey:@"animation3"];
[view.layer pop_addAnimation:animation4 forKey:@"animation4"];
}
#pragma mark - Getters And Setters
- (UIView *)firstView {
if (!_firstView) {
_firstView = [[UIView alloc] init];
_firstView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.3];
_firstView.layer.borderWidth = 1;
_firstView.layer.borderColor = [UIColor whiteColor].CGColor;
}
return _firstView;
}
@end

View File

@@ -19,16 +19,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong, readonly) UILabel *postionLabel; @property (nonatomic,strong, readonly) UILabel *postionLabel;
///用户名/号麦位 ///用户名/号麦位
@property (nonatomic,strong, readonly) UILabel *nickLabel; @property (nonatomic,strong, readonly) UILabel *nickLabel;
///头饰
//@property (nonatomic,strong, readonly) YYAnimatedImageView *headWearImageView;
///礼物值
//@property (nonatomic,strong, readonly) MicroGiftValueView *giftValueView;
///离开模式 ///离开模式
@property (nonatomic,strong, readonly) UILabel *leaveLabel; @property (nonatomic,strong, readonly) UILabel *leaveLabel;
///坑位是否闭麦的 ///坑位是否闭麦的
@property (nonatomic,strong, readonly) UIImageView *micStateImageView; @property (nonatomic,strong, readonly) UIImageView *micStateImageView;
///声波动画
//@property (nonatomic,strong, readonly) MicroWaveView *animationView;
///0 号麦位显示性别 ///0 号麦位显示性别
@property (nonatomic,strong, readonly) UIImageView *sexImageView; @property (nonatomic,strong, readonly) UIImageView *sexImageView;
///昵称容器 ///昵称容器

View File

@@ -6,7 +6,6 @@
// //
#import "MicroView.h" #import "MicroView.h"
#import "MicroWaveView.h"
/// Model /// Model
#import "UserInfoModel.h" #import "UserInfoModel.h"
#import "RoomInfoModel.h" #import "RoomInfoModel.h"
@@ -40,8 +39,6 @@
@property (nonatomic,strong) RoomInfoModel *roomInfo; @property (nonatomic,strong) RoomInfoModel *roomInfo;
/// ///
@property (nonatomic,strong) NSMutableDictionary<NSString *,MicroQueueModel *> *micQueue; @property (nonatomic,strong) NSMutableDictionary<NSString *,MicroQueueModel *> *micQueue;
///
@property (nonatomic,strong) MicroWaveView *animationView;
@end @end
@implementation MicroView @implementation MicroView
@@ -56,15 +53,8 @@
return self; return self;
} }
#pragma mark - Init View
#pragma mark - MicroViewProtocol #pragma mark - MicroViewProtocol
- (void)initSubViews { - (void)initSubViews {
[self addSubview:self.animationView];
[self addSubview:self.avatarImageView]; [self addSubview:self.avatarImageView];
[self addSubview:self.micStateImageView]; [self addSubview:self.micStateImageView];
self.stackView.hidden = [self isHiddenMicroUserInfoView]; self.stackView.hidden = [self isHiddenMicroUserInfoView];
@@ -75,10 +65,6 @@
} }
- (void)initSubViewConstraints { - (void)initSubViewConstraints {
// [self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.edges.mas_equalTo(self.avatarImageView);
// }];
//
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self); make.left.right.top.mas_equalTo(self);
make.height.mas_equalTo(self.mas_height); make.height.mas_equalTo(self.mas_height);
@@ -148,7 +134,7 @@
} }
/** */ /** */
- (RoomInfoModel *)getRoomInfo { - (RoomInfoModel *)getRoomInformation {
return self.roomInfo; return self.roomInfo;
} }
@@ -158,18 +144,13 @@
} }
/** */ /** */
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getMicroQueue { - (NSMutableDictionary<NSString *,MicroQueueModel *> *)getCustomMicroQueue {
return self.micQueue; return self.micQueue;
} }
/** */ /** */
- (void)userSpeaking { - (void)userSpeaking {
UserInfoModel * userInfo = self.microModel.userInfo; // [self.animationView startWaveAnimation];
// if (!userInfo.micCircle.length) {
[self.animationView startWaveAnimation];
// return;
// }
// [self.nobleWaveView startWaveAnimationWithUrl:userInfo.micCircle];
} }
@@ -199,8 +180,6 @@
if (!_avatarImageView) { if (!_avatarImageView) {
_avatarImageView = [[NetImageView alloc] init]; _avatarImageView = [[NetImageView alloc] init];
_avatarImageView.userInteractionEnabled = YES; _avatarImageView.userInteractionEnabled = YES;
// _avatarImageView.layer.cornerRadius = 70/2.0;
// _avatarImageView.layer.masksToBounds = YES;
} }
return _avatarImageView; return _avatarImageView;
} }
@@ -273,12 +252,12 @@
return _leaveLabel ; return _leaveLabel ;
} }
- (MicroWaveView *)animationView { //- (MicroWaveView *)animationView {
if (!_animationView) { // if (!_animationView) {
_animationView = [[MicroWaveView alloc] init]; // _animationView = [[MicroWaveView alloc] init];
} // }
return _animationView; // return _animationView;
} //}

View File

@@ -17,9 +17,6 @@ NS_ASSUME_NONNULL_BEGIN
/** 给子view 添加约束 */ /** 给子view 添加约束 */
- (void)initSubViewConstraints; - (void)initSubViewConstraints;
/** 离开模式。 */
- (void)showLeaveMode:(BOOL)isLeaveMode;
/** 设置麦位信息。 */ /** 设置麦位信息。 */
- (void)configMicroView:(MicroQueueModel *)model; - (void)configMicroView:(MicroQueueModel *)model;
@@ -35,13 +32,13 @@ NS_ASSUME_NONNULL_BEGIN
- (void)configRoomInfo:(RoomInfoModel *)roomInfo; - (void)configRoomInfo:(RoomInfoModel *)roomInfo;
/** 获取当前房间的信息 */ /** 获取当前房间的信息 */
- (RoomInfoModel *)getRoomInfo; - (RoomInfoModel *)getRoomInformation;
/** 设置当前房间的麦序 */ /** 设置当前房间的麦序 */
- (void)configMicQueue:(NSMutableDictionary <NSString *, MicroQueueModel *> *)micQueue; - (void)configMicQueue:(NSMutableDictionary <NSString *, MicroQueueModel *> *)micQueue;
/** 获取当前的麦序 */ /** 获取当前的麦序 */
- (NSMutableDictionary<NSString *, MicroQueueModel *>*)getMicroQueue; - (NSMutableDictionary<NSString *, MicroQueueModel *>*)getCustomMicroQueue;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -21,10 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
+ (UIColor *)positionFemaleNickBackColor; + (UIColor *)positionFemaleNickBackColor;
/// 没有用户的 坑位的背景色 /// 没有用户的 坑位的背景色
+ (UIColor *)positionNormalNickBackColor; + (UIColor *)positionNormalNickBackColor;
///老板位 坑位开始背景色
+ (UIColor *)positionBossBackStartColor;
///老板位 坑位结束背景色
+ (UIColor *)positionBossBackEndColor;
///坑位的昵称的颜色 0xFFFFFF ///坑位的昵称的颜色 0xFFFFFF
+ (UIColor *)positionNickColor; + (UIColor *)positionNickColor;
// ------公屏相关颜色 Start------ / // ------公屏相关颜色 Start------ /
@@ -32,32 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
+ (UIColor *)messageBubbleColor; + (UIColor *)messageBubbleColor;
///公屏文字的颜色 ///公屏文字的颜色
+ (UIColor *)messageTextColor; + (UIColor *)messageTextColor;
///公屏名字的颜色
+ (UIColor *)messageNickColor;
///默认的文字的颜色 ///默认的文字的颜色
+ (UIColor *)messageDefaultTextColor; + (UIColor *)messageDefaultTextColor;
///获取公屏提示 颜色 #FFFFFE 0.5
+ (UIColor *)messageViewTipColor;
// ------公屏相关颜色 END------ /
// ------房间内礼物 Start------ /
///礼物广播显示 个数的颜色 #FEF563
+ (UIColor *)giftBroadcastNumberColor;
///礼物广播 显示的名字的颜色 #2F0060
+ (UIColor *)giftBroadcastNickColor;
// ------房间内礼物 End------ /
/// 糖果树记录钻石的颜色
+ (UIColor *)candyTreeDiamondColor;
/// 糖果树名字的颜色
+ (UIColor *)candyTreeNickColor;
/// 糖果树的分割线颜色
+ (UIColor *)candyTreeDividerColor;
///动画礼物个数的颜色 0xFFF226
+ (UIColor *)animationGiftNumberColor;
///更多menu文字颜色 0xFFFFFF
+ (UIColor *)roomMoreMenuTextColor;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -40,15 +40,6 @@
return [UIColor colorWithWhite:1 alpha:0.2]; return [UIColor colorWithWhite:1 alpha:0.2];
} }
///
+ (UIColor *)positionBossBackStartColor {
return UIColorFromRGB(0xEFCC95);
}
///
+ (UIColor *)positionBossBackEndColor {
return UIColorFromRGB(0xF1B54D);
}
// ------ Start------ / // ------ Start------ /
/// ///
@@ -59,55 +50,12 @@
+ (UIColor *)messageTextColor { + (UIColor *)messageTextColor {
return [UIColor whiteColor]; return [UIColor whiteColor];
} }
///
+ (UIColor *)messageNickColor {
return UIColorFromRGB(0xFFD98C);
}
/// ///
+ (UIColor *)messageDefaultTextColor { + (UIColor *)messageDefaultTextColor {
return [UIColor colorWithWhite:1 alpha:0.5]; return [UIColor colorWithWhite:1 alpha:0.5];
} }
/// #FFFFFE 0.5
+ (UIColor *)messageViewTipColor{
return UIColorRGBAlpha(0xfffffe, 0.5);
}
// ------ END------ /
///广 #2F0060
+ (UIColor *)giftBroadcastNickColor {
return UIColorFromRGB(0xFFFFFF);
}
///广 #FEF563
+ (UIColor *)giftBroadcastNumberColor {
return UIColorFromRGB(0xFEF563);
}
///
+ (UIColor *)candyTreeDiamondColor {
return UIColorFromRGB(0x1194F5);
}
/// 线
+ (UIColor *)candyTreeDividerColor {
return UIColorFromRGB(0xEDEDED);
}
///
+ (UIColor *)candyTreeNickColor {
return UIColorFromRGB(0x333333);
}
/// 0xFFF226
+ (UIColor *)animationGiftNumberColor {
return UIColorFromRGB(0xFFF226);
}
///menu 0xFFFFFF
+ (UIColor *)roomMoreMenuTextColor {
return UIColorFromRGB(0xFFFFFF);
}
@end @end

View File

@@ -1,37 +0,0 @@
//
// YMRoomMiniManager.h
// mew-ios
//
// Created by 触海 on 2023/11/7.
//
#import <Foundation/Foundation.h>
@class RoomInfoModel, NIMMessage, UserInfoModel;
NS_ASSUME_NONNULL_BEGIN
@interface YMRoomMiniManager : NSObject
+ (instancetype)shareManager;
/// 获取房间信息
- (RoomInfoModel *)getRoomInfo;
/// 获取用户信息
- (UserInfoModel *)getUserInfo;
/// 配置用户信息
/// - Parameter userInfo: 用户信息
- (void)configUserInfo:(UserInfoModel * _Nullable)userInfo;
/// 配置房间信息
/// - Parameter userInfo: 房间信息
- (void)configRoomInfo:(RoomInfoModel * _Nullable)roomInfo;
///保存一下 房间的公屏防止最小化出去之后 被清空了
- (void)saveRoomMessage:(NIMMessage *)message;
/// 获取当前房间保存的信息
- (NSArray<NIMMessage *> *)getLocalCurrentRoomMessage;
/// 充值本地保存的信息
- (void)resetLocalMessage;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,78 +0,0 @@
//
// YMRoomMiniManager.m
// mew-ios
//
// Created by on 2023/11/7.
//
#import "YMRoomMiniManager.h"
#import "YMRoomMessageConstant.h"
@interface YMRoomMiniManager()
///
@property (nonatomic,strong) NSMutableArray *messageArray;
///
@property (nonatomic,strong) RoomInfoModel *roomInfo;
///
@property (nonatomic,strong) UserInfoModel *userInfo;
@end
@implementation YMRoomMiniManager
#pragma mark - Public Method
+ (instancetype)shareManager {
static dispatch_once_t onceToken;
static YMRoomMiniManager *instance;
dispatch_once(&onceToken, ^{
instance = [[YMRoomMiniManager alloc] init];
});
return instance;
}
- (RoomInfoModel *)getRoomInfo {
return self.roomInfo;
}
- (void)configRoomInfo:(RoomInfoModel *_Nullable)roomInfo {
self.roomInfo = roomInfo;
}
- (UserInfoModel *)getUserInfo {
return self.userInfo;
}
- (void)configUserInfo:(UserInfoModel * _Nullable)userInfo {
self.userInfo = userInfo;
}
///
- (void)saveRoomMessage:(NIMMessage *)message {
[self.messageArray addObject:message];
if (self.messageArray.count > kRoomMessageMaxLength) {
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
NSArray *needRemoveMsgArray = [self.messageArray objectsAtIndexes:set];
[self.messageArray removeObjectsInArray:needRemoveMsgArray];
}
}
- (NSArray<NIMMessage *> *)getLocalCurrentRoomMessage {
return [self.messageArray copy];
}
- (void)resetLocalMessage {
[self.messageArray removeAllObjects];
}
#pragma mark - Get
- (NSMutableArray *)messageArray {
if (!_messageArray) {
_messageArray = [NSMutableArray array];
}
return _messageArray;
}
@end