Compare commits
3 Commits
cff4ddeeba
...
0147800f75
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0147800f75 | ||
![]() |
f15d229ae1 | ||
![]() |
8dbb02228f |
@@ -506,7 +506,12 @@
|
|||||||
4C3851992DD5F4D50089CFCC /* EventConfigModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3851982DD5F4D50089CFCC /* EventConfigModel.m */; };
|
4C3851992DD5F4D50089CFCC /* EventConfigModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C3851982DD5F4D50089CFCC /* EventConfigModel.m */; };
|
||||||
4C38C2AD2D84064400CFA4A8 /* LoginInputItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C38C2AC2D84064300CFA4A8 /* LoginInputItemView.m */; };
|
4C38C2AD2D84064400CFA4A8 /* LoginInputItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C38C2AC2D84064300CFA4A8 /* LoginInputItemView.m */; };
|
||||||
4C38C2B02D84070600CFA4A8 /* AccountBindingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C38C2AF2D84070600CFA4A8 /* AccountBindingViewController.m */; };
|
4C38C2B02D84070600CFA4A8 /* AccountBindingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C38C2AF2D84070600CFA4A8 /* AccountBindingViewController.m */; };
|
||||||
|
4C4283F62E66C769006779B0 /* XPEffectPanelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4283F52E66C769006779B0 /* XPEffectPanelViewController.m */; };
|
||||||
4C44BD5D2D151B5C00F321FA /* RoomSideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */; };
|
4C44BD5D2D151B5C00F321FA /* RoomSideMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */; };
|
||||||
|
4C45C1A52E6825F300E73A44 /* XPTurboModeConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C45C1A42E6825F300E73A44 /* XPTurboModeConstants.m */; };
|
||||||
|
4C45C1A92E6837BF00E73A44 /* TurboModeStateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C45C1A72E6837BF00E73A44 /* TurboModeStateManager.m */; };
|
||||||
|
4C45C1AC2E68545E00E73A44 /* XPTurboModeTipsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C45C1AB2E68545E00E73A44 /* XPTurboModeTipsView.m */; };
|
||||||
|
4C45C1AF2E6855F600E73A44 /* XPTurboModeTipsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C45C1AE2E6855F600E73A44 /* XPTurboModeTipsManager.m */; };
|
||||||
4C4707A52D53430300C8CD24 /* NSData+GZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4707A42D53430300C8CD24 /* NSData+GZIP.m */; };
|
4C4707A52D53430300C8CD24 /* NSData+GZIP.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C4707A42D53430300C8CD24 /* NSData+GZIP.m */; };
|
||||||
4C51B09C2DA3B4C600D8DFB5 /* LudoGameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C51B09B2DA3B4C600D8DFB5 /* LudoGameViewController.m */; };
|
4C51B09C2DA3B4C600D8DFB5 /* LudoGameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C51B09B2DA3B4C600D8DFB5 /* LudoGameViewController.m */; };
|
||||||
4C51B09F2DA50FDA00D8DFB5 /* CPRelationshipChangeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C51B09E2DA50FDA00D8DFB5 /* CPRelationshipChangeView.m */; };
|
4C51B09F2DA50FDA00D8DFB5 /* CPRelationshipChangeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C51B09E2DA50FDA00D8DFB5 /* CPRelationshipChangeView.m */; };
|
||||||
@@ -571,6 +576,7 @@
|
|||||||
4CC312272D79A10100F57A07 /* ShareProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC312262D79A10100F57A07 /* ShareProvider.m */; };
|
4CC312272D79A10100F57A07 /* ShareProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC312262D79A10100F57A07 /* ShareProvider.m */; };
|
||||||
4CC6195A2CEC7770008C1EE8 /* MyDressingDataPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */; };
|
4CC6195A2CEC7770008C1EE8 /* MyDressingDataPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */; };
|
||||||
4CC6195D2CEC996E008C1EE8 /* MyDressingDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */; };
|
4CC6195D2CEC996E008C1EE8 /* MyDressingDataModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */; };
|
||||||
|
4CC77BBD2E66A33C0067DA96 /* XPRoomEffectAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CC77BBC2E66A33C0067DA96 /* XPRoomEffectAction.m */; };
|
||||||
4CCA0C6E2DDED89F00E30513 /* Custom9MicLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA0C672DDED89F00E30513 /* Custom9MicLayout.m */; };
|
4CCA0C6E2DDED89F00E30513 /* Custom9MicLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA0C672DDED89F00E30513 /* Custom9MicLayout.m */; };
|
||||||
4CCA0C6F2DDED89F00E30513 /* UserRoomMicPositionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA0C6D2DDED89F00E30513 /* UserRoomMicPositionView.m */; };
|
4CCA0C6F2DDED89F00E30513 /* UserRoomMicPositionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA0C6D2DDED89F00E30513 /* UserRoomMicPositionView.m */; };
|
||||||
4CCA0C702DDED89F00E30513 /* UserRoomMicPositionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA0C6B2DDED89F00E30513 /* UserRoomMicPositionCell.m */; };
|
4CCA0C702DDED89F00E30513 /* UserRoomMicPositionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA0C6B2DDED89F00E30513 /* UserRoomMicPositionCell.m */; };
|
||||||
@@ -585,7 +591,7 @@
|
|||||||
4CD47BB52E61514900BCDA46 /* StageViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BB42E61514900BCDA46 /* StageViewManager.m */; };
|
4CD47BB52E61514900BCDA46 /* StageViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BB42E61514900BCDA46 /* StageViewManager.m */; };
|
||||||
4CD47BBE2E619F1700BCDA46 /* XPRoomMoreMenuAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BBB2E619F1700BCDA46 /* XPRoomMoreMenuAction.m */; };
|
4CD47BBE2E619F1700BCDA46 /* XPRoomMoreMenuAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BBB2E619F1700BCDA46 /* XPRoomMoreMenuAction.m */; };
|
||||||
4CD47BBF2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BBD2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.m */; };
|
4CD47BBF2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BBD2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.m */; };
|
||||||
4CD47BC42E61A4E000BCDA46 /* XPGiftEffectAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BC32E61A4E000BCDA46 /* XPGiftEffectAction.m */; };
|
4CD47BC42E61A4E000BCDA46 /* XPTurboModeAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BC32E61A4E000BCDA46 /* XPTurboModeAction.m */; };
|
||||||
4CD47BC62E61A4FA00BCDA46 /* XPRoomMoreMenuActionFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BC52E61A4FA00BCDA46 /* XPRoomMoreMenuActionFactory.m */; };
|
4CD47BC62E61A4FA00BCDA46 /* XPRoomMoreMenuActionFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BC52E61A4FA00BCDA46 /* XPRoomMoreMenuActionFactory.m */; };
|
||||||
4CD47BC92E61A78D00BCDA46 /* XPRoomSettingAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BC82E61A78D00BCDA46 /* XPRoomSettingAction.m */; };
|
4CD47BC92E61A78D00BCDA46 /* XPRoomSettingAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BC82E61A78D00BCDA46 /* XPRoomSettingAction.m */; };
|
||||||
4CD47BCC2E61ADE400BCDA46 /* XPSocialAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BCB2E61ADE400BCDA46 /* XPSocialAction.m */; };
|
4CD47BCC2E61ADE400BCDA46 /* XPSocialAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD47BCB2E61ADE400BCDA46 /* XPSocialAction.m */; };
|
||||||
@@ -2675,8 +2681,18 @@
|
|||||||
4C38C2AC2D84064300CFA4A8 /* LoginInputItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginInputItemView.m; sourceTree = "<group>"; };
|
4C38C2AC2D84064300CFA4A8 /* LoginInputItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginInputItemView.m; sourceTree = "<group>"; };
|
||||||
4C38C2AE2D84070600CFA4A8 /* AccountBindingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountBindingViewController.h; sourceTree = "<group>"; };
|
4C38C2AE2D84070600CFA4A8 /* AccountBindingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountBindingViewController.h; sourceTree = "<group>"; };
|
||||||
4C38C2AF2D84070600CFA4A8 /* AccountBindingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AccountBindingViewController.m; sourceTree = "<group>"; };
|
4C38C2AF2D84070600CFA4A8 /* AccountBindingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AccountBindingViewController.m; sourceTree = "<group>"; };
|
||||||
|
4C4283F42E66C769006779B0 /* XPEffectPanelViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEffectPanelViewController.h; sourceTree = "<group>"; };
|
||||||
|
4C4283F52E66C769006779B0 /* XPEffectPanelViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEffectPanelViewController.m; sourceTree = "<group>"; };
|
||||||
4C44BD5B2D151B5C00F321FA /* RoomSideMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomSideMenu.h; sourceTree = "<group>"; };
|
4C44BD5B2D151B5C00F321FA /* RoomSideMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomSideMenu.h; sourceTree = "<group>"; };
|
||||||
4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSideMenu.m; sourceTree = "<group>"; };
|
4C44BD5C2D151B5C00F321FA /* RoomSideMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomSideMenu.m; sourceTree = "<group>"; };
|
||||||
|
4C45C1A32E6825F300E73A44 /* XPTurboModeConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPTurboModeConstants.h; sourceTree = "<group>"; };
|
||||||
|
4C45C1A42E6825F300E73A44 /* XPTurboModeConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTurboModeConstants.m; sourceTree = "<group>"; };
|
||||||
|
4C45C1A62E6837BF00E73A44 /* TurboModeStateManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TurboModeStateManager.h; sourceTree = "<group>"; };
|
||||||
|
4C45C1A72E6837BF00E73A44 /* TurboModeStateManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TurboModeStateManager.m; sourceTree = "<group>"; };
|
||||||
|
4C45C1AA2E68545E00E73A44 /* XPTurboModeTipsView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPTurboModeTipsView.h; sourceTree = "<group>"; };
|
||||||
|
4C45C1AB2E68545E00E73A44 /* XPTurboModeTipsView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTurboModeTipsView.m; sourceTree = "<group>"; };
|
||||||
|
4C45C1AD2E6855F600E73A44 /* XPTurboModeTipsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPTurboModeTipsManager.h; sourceTree = "<group>"; };
|
||||||
|
4C45C1AE2E6855F600E73A44 /* XPTurboModeTipsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTurboModeTipsManager.m; sourceTree = "<group>"; };
|
||||||
4C4707A32D53430300C8CD24 /* NSData+GZIP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+GZIP.h"; sourceTree = "<group>"; };
|
4C4707A32D53430300C8CD24 /* NSData+GZIP.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+GZIP.h"; sourceTree = "<group>"; };
|
||||||
4C4707A42D53430300C8CD24 /* NSData+GZIP.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+GZIP.m"; sourceTree = "<group>"; };
|
4C4707A42D53430300C8CD24 /* NSData+GZIP.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+GZIP.m"; sourceTree = "<group>"; };
|
||||||
4C4DE6442E2513DA00122763 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
4C4DE6442E2513DA00122763 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||||
@@ -2803,6 +2819,8 @@
|
|||||||
4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataPresent.m; sourceTree = "<group>"; };
|
4CC619592CEC7770008C1EE8 /* MyDressingDataPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataPresent.m; sourceTree = "<group>"; };
|
||||||
4CC6195B2CEC996E008C1EE8 /* MyDressingDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDressingDataModel.h; sourceTree = "<group>"; };
|
4CC6195B2CEC996E008C1EE8 /* MyDressingDataModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyDressingDataModel.h; sourceTree = "<group>"; };
|
||||||
4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataModel.m; sourceTree = "<group>"; };
|
4CC6195C2CEC996E008C1EE8 /* MyDressingDataModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyDressingDataModel.m; sourceTree = "<group>"; };
|
||||||
|
4CC77BBB2E66A33C0067DA96 /* XPRoomEffectAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomEffectAction.h; sourceTree = "<group>"; };
|
||||||
|
4CC77BBC2E66A33C0067DA96 /* XPRoomEffectAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomEffectAction.m; sourceTree = "<group>"; };
|
||||||
4CCA0C662DDED89F00E30513 /* Custom9MicLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Custom9MicLayout.h; sourceTree = "<group>"; };
|
4CCA0C662DDED89F00E30513 /* Custom9MicLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Custom9MicLayout.h; sourceTree = "<group>"; };
|
||||||
4CCA0C672DDED89F00E30513 /* Custom9MicLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Custom9MicLayout.m; sourceTree = "<group>"; };
|
4CCA0C672DDED89F00E30513 /* Custom9MicLayout.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Custom9MicLayout.m; sourceTree = "<group>"; };
|
||||||
4CCA0C682DDED89F00E30513 /* Custom19MicLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Custom19MicLayout.h; sourceTree = "<group>"; };
|
4CCA0C682DDED89F00E30513 /* Custom19MicLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Custom19MicLayout.h; sourceTree = "<group>"; };
|
||||||
@@ -2825,13 +2843,13 @@
|
|||||||
4CD15D942D7FE9E400D9279F /* LoginTypesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginTypesViewController.m; sourceTree = "<group>"; };
|
4CD15D942D7FE9E400D9279F /* LoginTypesViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginTypesViewController.m; sourceTree = "<group>"; };
|
||||||
4CD47BB32E61514900BCDA46 /* StageViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StageViewManager.h; sourceTree = "<group>"; };
|
4CD47BB32E61514900BCDA46 /* StageViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StageViewManager.h; sourceTree = "<group>"; };
|
||||||
4CD47BB42E61514900BCDA46 /* StageViewManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StageViewManager.m; sourceTree = "<group>"; };
|
4CD47BB42E61514900BCDA46 /* StageViewManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StageViewManager.m; sourceTree = "<group>"; };
|
||||||
4CD47BB62E619F0B00BCDA46 /* XPGiftEffectAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGiftEffectAction.h; sourceTree = "<group>"; };
|
4CD47BB62E619F0B00BCDA46 /* XPTurboModeAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPTurboModeAction.h; sourceTree = "<group>"; };
|
||||||
4CD47BB82E619F0B00BCDA46 /* XPRoomMoreMenuActionFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuActionFactory.h; sourceTree = "<group>"; };
|
4CD47BB82E619F0B00BCDA46 /* XPRoomMoreMenuActionFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuActionFactory.h; sourceTree = "<group>"; };
|
||||||
4CD47BBA2E619F1700BCDA46 /* XPRoomMoreMenuAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuAction.h; sourceTree = "<group>"; };
|
4CD47BBA2E619F1700BCDA46 /* XPRoomMoreMenuAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuAction.h; sourceTree = "<group>"; };
|
||||||
4CD47BBB2E619F1700BCDA46 /* XPRoomMoreMenuAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuAction.m; sourceTree = "<group>"; };
|
4CD47BBB2E619F1700BCDA46 /* XPRoomMoreMenuAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuAction.m; sourceTree = "<group>"; };
|
||||||
4CD47BBC2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuActionContext.h; sourceTree = "<group>"; };
|
4CD47BBC2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuActionContext.h; sourceTree = "<group>"; };
|
||||||
4CD47BBD2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuActionContext.m; sourceTree = "<group>"; };
|
4CD47BBD2E619F1700BCDA46 /* XPRoomMoreMenuActionContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuActionContext.m; sourceTree = "<group>"; };
|
||||||
4CD47BC32E61A4E000BCDA46 /* XPGiftEffectAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGiftEffectAction.m; sourceTree = "<group>"; };
|
4CD47BC32E61A4E000BCDA46 /* XPTurboModeAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPTurboModeAction.m; sourceTree = "<group>"; };
|
||||||
4CD47BC52E61A4FA00BCDA46 /* XPRoomMoreMenuActionFactory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuActionFactory.m; sourceTree = "<group>"; };
|
4CD47BC52E61A4FA00BCDA46 /* XPRoomMoreMenuActionFactory.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuActionFactory.m; sourceTree = "<group>"; };
|
||||||
4CD47BC72E61A78D00BCDA46 /* XPRoomSettingAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomSettingAction.h; sourceTree = "<group>"; };
|
4CD47BC72E61A78D00BCDA46 /* XPRoomSettingAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomSettingAction.h; sourceTree = "<group>"; };
|
||||||
4CD47BC82E61A78D00BCDA46 /* XPRoomSettingAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomSettingAction.m; sourceTree = "<group>"; };
|
4CD47BC82E61A78D00BCDA46 /* XPRoomSettingAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomSettingAction.m; sourceTree = "<group>"; };
|
||||||
@@ -6791,6 +6809,17 @@
|
|||||||
path = SubViews;
|
path = SubViews;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
4C45C1A82E6837BF00E73A44 /* Manager */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
4C45C1AD2E6855F600E73A44 /* XPTurboModeTipsManager.h */,
|
||||||
|
4C45C1AE2E6855F600E73A44 /* XPTurboModeTipsManager.m */,
|
||||||
|
4C45C1A62E6837BF00E73A44 /* TurboModeStateManager.h */,
|
||||||
|
4C45C1A72E6837BF00E73A44 /* TurboModeStateManager.m */,
|
||||||
|
);
|
||||||
|
path = Manager;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
4C47079F2D5342C500C8CD24 /* GZIP */ = {
|
4C47079F2D5342C500C8CD24 /* GZIP */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -6913,8 +6942,8 @@
|
|||||||
4C0B4A392E6579C700D67F73 /* XPPKAction.m */,
|
4C0B4A392E6579C700D67F73 /* XPPKAction.m */,
|
||||||
4CD47BCA2E61ADE400BCDA46 /* XPSocialAction.h */,
|
4CD47BCA2E61ADE400BCDA46 /* XPSocialAction.h */,
|
||||||
4CD47BCB2E61ADE400BCDA46 /* XPSocialAction.m */,
|
4CD47BCB2E61ADE400BCDA46 /* XPSocialAction.m */,
|
||||||
4CD47BB62E619F0B00BCDA46 /* XPGiftEffectAction.h */,
|
4CD47BB62E619F0B00BCDA46 /* XPTurboModeAction.h */,
|
||||||
4CD47BC32E61A4E000BCDA46 /* XPGiftEffectAction.m */,
|
4CD47BC32E61A4E000BCDA46 /* XPTurboModeAction.m */,
|
||||||
4CD47BC72E61A78D00BCDA46 /* XPRoomSettingAction.h */,
|
4CD47BC72E61A78D00BCDA46 /* XPRoomSettingAction.h */,
|
||||||
4CD47BC82E61A78D00BCDA46 /* XPRoomSettingAction.m */,
|
4CD47BC82E61A78D00BCDA46 /* XPRoomSettingAction.m */,
|
||||||
4C0B4A3C2E659A2C00D67F73 /* XPRoomTypeSettingAction.h */,
|
4C0B4A3C2E659A2C00D67F73 /* XPRoomTypeSettingAction.h */,
|
||||||
@@ -6931,6 +6960,8 @@
|
|||||||
4C0B4A4C2E65A63400D67F73 /* XPRoomRoomPhotoAction.m */,
|
4C0B4A4C2E65A63400D67F73 /* XPRoomRoomPhotoAction.m */,
|
||||||
4C0B4A4E2E65A68800D67F73 /* XPRoomAppManagerAction.h */,
|
4C0B4A4E2E65A68800D67F73 /* XPRoomAppManagerAction.h */,
|
||||||
4C0B4A4F2E65A68800D67F73 /* XPRoomAppManagerAction.m */,
|
4C0B4A4F2E65A68800D67F73 /* XPRoomAppManagerAction.m */,
|
||||||
|
4CC77BBB2E66A33C0067DA96 /* XPRoomEffectAction.h */,
|
||||||
|
4CC77BBC2E66A33C0067DA96 /* XPRoomEffectAction.m */,
|
||||||
);
|
);
|
||||||
path = Action;
|
path = Action;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -11168,6 +11199,9 @@
|
|||||||
E8DEC9962764A51F0078CB70 /* MoreView */ = {
|
E8DEC9962764A51F0078CB70 /* MoreView */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
4C45C1A82E6837BF00E73A44 /* Manager */,
|
||||||
|
4C45C1A32E6825F300E73A44 /* XPTurboModeConstants.h */,
|
||||||
|
4C45C1A42E6825F300E73A44 /* XPTurboModeConstants.m */,
|
||||||
4CD47BB72E619F0B00BCDA46 /* Action */,
|
4CD47BB72E619F0B00BCDA46 /* Action */,
|
||||||
4CD47BB92E619F0B00BCDA46 /* Factory */,
|
4CD47BB92E619F0B00BCDA46 /* Factory */,
|
||||||
E8DEC99B2764A5620078CB70 /* Model */,
|
E8DEC99B2764A5620078CB70 /* Model */,
|
||||||
@@ -11199,6 +11233,10 @@
|
|||||||
E8DEC9992764A54C0078CB70 /* View */ = {
|
E8DEC9992764A54C0078CB70 /* View */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
4C45C1AA2E68545E00E73A44 /* XPTurboModeTipsView.h */,
|
||||||
|
4C45C1AB2E68545E00E73A44 /* XPTurboModeTipsView.m */,
|
||||||
|
4C4283F42E66C769006779B0 /* XPEffectPanelViewController.h */,
|
||||||
|
4C4283F52E66C769006779B0 /* XPEffectPanelViewController.m */,
|
||||||
E8DEC9A92764A6AF0078CB70 /* Cell */,
|
E8DEC9A92764A6AF0078CB70 /* Cell */,
|
||||||
E8DEC99C2764A5B60078CB70 /* XPRoomMoreMenuViewController.h */,
|
E8DEC99C2764A5B60078CB70 /* XPRoomMoreMenuViewController.h */,
|
||||||
E8DEC99D2764A5B60078CB70 /* XPRoomMoreMenuViewController.m */,
|
E8DEC99D2764A5B60078CB70 /* XPRoomMoreMenuViewController.m */,
|
||||||
@@ -12315,7 +12353,7 @@
|
|||||||
E8A3538528FD67320014A784 /* GiftLuckyBroadcastModel.m in Sources */,
|
E8A3538528FD67320014A784 /* GiftLuckyBroadcastModel.m in Sources */,
|
||||||
9B4C5B86292F81FA00CEA41B /* XPSessionListFansPartyModel.m in Sources */,
|
9B4C5B86292F81FA00CEA41B /* XPSessionListFansPartyModel.m in Sources */,
|
||||||
547080DB2CD0EEB4009879E5 /* CustomRoomBGContentViewController.m in Sources */,
|
547080DB2CD0EEB4009879E5 /* CustomRoomBGContentViewController.m in Sources */,
|
||||||
4CD47BC42E61A4E000BCDA46 /* XPGiftEffectAction.m in Sources */,
|
4CD47BC42E61A4E000BCDA46 /* XPTurboModeAction.m in Sources */,
|
||||||
237B94BD2A984DA7007853E3 /* XPNobleTrumpetModel.m in Sources */,
|
237B94BD2A984DA7007853E3 /* XPNobleTrumpetModel.m in Sources */,
|
||||||
E82325F5274E2E09003A3332 /* XPUserCardPresenter.m in Sources */,
|
E82325F5274E2E09003A3332 /* XPUserCardPresenter.m in Sources */,
|
||||||
236B2E4C2AA07D06003967A8 /* XPLittleGameRoomOpenView.m in Sources */,
|
236B2E4C2AA07D06003967A8 /* XPLittleGameRoomOpenView.m in Sources */,
|
||||||
@@ -12330,6 +12368,7 @@
|
|||||||
1427218729A75F6F00C7C423 /* MyHTTPConnection.m in Sources */,
|
1427218729A75F6F00C7C423 /* MyHTTPConnection.m in Sources */,
|
||||||
23CEFB6C2AFB803B00576D89 /* PISwitchingEnvironmentVC.m in Sources */,
|
23CEFB6C2AFB803B00576D89 /* PISwitchingEnvironmentVC.m in Sources */,
|
||||||
E8D55C9D28113218006935A5 /* MessageMenuModel.m in Sources */,
|
E8D55C9D28113218006935A5 /* MessageMenuModel.m in Sources */,
|
||||||
|
4C45C1A92E6837BF00E73A44 /* TurboModeStateManager.m in Sources */,
|
||||||
E87DF4EF2A42CB90009C1185 /* XPHomeCollectRoomTableViewCell.m in Sources */,
|
E87DF4EF2A42CB90009C1185 /* XPHomeCollectRoomTableViewCell.m in Sources */,
|
||||||
2368ECDF2BC51B2D00EDF4C9 /* XPMineSwitchLanguageCell.m in Sources */,
|
2368ECDF2BC51B2D00EDF4C9 /* XPMineSwitchLanguageCell.m in Sources */,
|
||||||
236B2E442AA07D06003967A8 /* UIColor+RW.m in Sources */,
|
236B2E442AA07D06003967A8 /* UIColor+RW.m in Sources */,
|
||||||
@@ -12351,6 +12390,7 @@
|
|||||||
9BD63FB4277EF1B3006EB744 /* XPReleaseRadioModel.m in Sources */,
|
9BD63FB4277EF1B3006EB744 /* XPReleaseRadioModel.m in Sources */,
|
||||||
E80EC8C228ACF97A00D133C5 /* QEEmotionImageView.m in Sources */,
|
E80EC8C228ACF97A00D133C5 /* QEEmotionImageView.m in Sources */,
|
||||||
E8A03DFF27635F960098D9EA /* XPRoomCandyGiftView.m in Sources */,
|
E8A03DFF27635F960098D9EA /* XPRoomCandyGiftView.m in Sources */,
|
||||||
|
4C45C1AC2E68545E00E73A44 /* XPTurboModeTipsView.m in Sources */,
|
||||||
180116F9279E8C4C00F2CBC0 /* PLTimeUtil.m in Sources */,
|
180116F9279E8C4C00F2CBC0 /* PLTimeUtil.m in Sources */,
|
||||||
23CEFC502AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m in Sources */,
|
23CEFC502AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m in Sources */,
|
||||||
E87E545429AA05EA00EBE52B /* XPFootPrintNavView.m in Sources */,
|
E87E545429AA05EA00EBE52B /* XPFootPrintNavView.m in Sources */,
|
||||||
@@ -12359,6 +12399,7 @@
|
|||||||
E84BF7D1277BFCDD00EF8877 /* RoomTagModel.m in Sources */,
|
E84BF7D1277BFCDD00EF8877 /* RoomTagModel.m in Sources */,
|
||||||
E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */,
|
E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */,
|
||||||
1427218E29A75F6F00C7C423 /* HTTPMessage.m in Sources */,
|
1427218E29A75F6F00C7C423 /* HTTPMessage.m in Sources */,
|
||||||
|
4C45C1A52E6825F300E73A44 /* XPTurboModeConstants.m in Sources */,
|
||||||
239D0FE72C049D61002977CE /* MSRoomGameMsgView.m in Sources */,
|
239D0FE72C049D61002977CE /* MSRoomGameMsgView.m in Sources */,
|
||||||
238B37BE2AC55A2C00BFC9D5 /* XPTreasureFairyBottomView.m in Sources */,
|
238B37BE2AC55A2C00BFC9D5 /* XPTreasureFairyBottomView.m in Sources */,
|
||||||
9B42869828C1E06B009034D2 /* XPRedPacketModel.m in Sources */,
|
9B42869828C1E06B009034D2 /* XPRedPacketModel.m in Sources */,
|
||||||
@@ -12395,6 +12436,7 @@
|
|||||||
E8E20BEC2816A5B90033B688 /* XPMineBlackListViewController.m in Sources */,
|
E8E20BEC2816A5B90033B688 /* XPMineBlackListViewController.m in Sources */,
|
||||||
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */,
|
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */,
|
||||||
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */,
|
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */,
|
||||||
|
4C45C1AF2E6855F600E73A44 /* XPTurboModeTipsManager.m in Sources */,
|
||||||
54C9A11F2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m in Sources */,
|
54C9A11F2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m in Sources */,
|
||||||
2331C1B12A60F32D00E1D940 /* XPCandyTreeGiftView.m in Sources */,
|
2331C1B12A60F32D00E1D940 /* XPCandyTreeGiftView.m in Sources */,
|
||||||
9B1B72BC28003E06003FACE9 /* XPAnchorPKTableViewCell.m in Sources */,
|
9B1B72BC28003E06003FACE9 /* XPAnchorPKTableViewCell.m in Sources */,
|
||||||
@@ -12757,6 +12799,7 @@
|
|||||||
23E9EAAD2A84C9B800B792F2 /* XPMineUserInfoTagItemView.m in Sources */,
|
23E9EAAD2A84C9B800B792F2 /* XPMineUserInfoTagItemView.m in Sources */,
|
||||||
18A61BE8274F9CF000A09A54 /* SessionListViewController.m in Sources */,
|
18A61BE8274F9CF000A09A54 /* SessionListViewController.m in Sources */,
|
||||||
E8C1CD6A27D8937800376F83 /* XPRoomFaceCollectionViewCell.m in Sources */,
|
E8C1CD6A27D8937800376F83 /* XPRoomFaceCollectionViewCell.m in Sources */,
|
||||||
|
4CC77BBD2E66A33C0067DA96 /* XPRoomEffectAction.m in Sources */,
|
||||||
9B2EA7C02804037700ED17BF /* AnchorPKStageView.m in Sources */,
|
9B2EA7C02804037700ED17BF /* AnchorPKStageView.m in Sources */,
|
||||||
4C1392992D6DB4CD00A6DFB5 /* MoliMoneyLabel.m in Sources */,
|
4C1392992D6DB4CD00A6DFB5 /* MoliMoneyLabel.m in Sources */,
|
||||||
23CEFC622AFB8FC100576D89 /* BSLogNetDetailViewController.m in Sources */,
|
23CEFC622AFB8FC100576D89 /* BSLogNetDetailViewController.m in Sources */,
|
||||||
@@ -13402,6 +13445,7 @@
|
|||||||
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */,
|
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */,
|
||||||
E85E7BA02A4EC99300B6D00A /* XPMineGiveDiamondDetailsModel.m in Sources */,
|
E85E7BA02A4EC99300B6D00A /* XPMineGiveDiamondDetailsModel.m in Sources */,
|
||||||
4CE746C32D9290430094E496 /* RoomBoomManager.m in Sources */,
|
4CE746C32D9290430094E496 /* RoomBoomManager.m in Sources */,
|
||||||
|
4C4283F62E66C769006779B0 /* XPEffectPanelViewController.m in Sources */,
|
||||||
4CBBB44C2DA66334001B1C6D /* MessageCPNotifyModel.m in Sources */,
|
4CBBB44C2DA66334001B1C6D /* MessageCPNotifyModel.m in Sources */,
|
||||||
E81A654C28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m in Sources */,
|
E81A654C28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m in Sources */,
|
||||||
E85E7B9F2A4EC99300B6D00A /* XPMineGiveDiamondPresenter.m in Sources */,
|
E85E7B9F2A4EC99300B6D00A /* XPMineGiveDiamondPresenter.m in Sources */,
|
||||||
|
6
YuMi/Assets.xcassets/20.20.62/Contents.json
Normal file
6
YuMi/Assets.xcassets/20.20.62/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
21
YuMi/Assets.xcassets/20.20.62/icon_turbo_mode.imageset/Contents.json
vendored
Normal file
21
YuMi/Assets.xcassets/20.20.62/icon_turbo_mode.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "房间背景@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/20.20.62/icon_turbo_mode.imageset/房间背景@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/20.20.62/icon_turbo_mode.imageset/房间背景@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
@@ -227,6 +227,14 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:发送卡顿检测通知,用于在房间中显示 Turbo Mode Tips
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"BuglyManagerDidDetectLag"
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"duration": @(duration),
|
||||||
|
@"stackTrace": stackTrace ?: @""}];
|
||||||
|
});
|
||||||
|
|
||||||
// TODO: 触发卡顿通知逻辑
|
// TODO: 触发卡顿通知逻辑
|
||||||
// 1. 记录卡顿信息到本地日志
|
// 1. 记录卡顿信息到本地日志
|
||||||
// 2. 发送本地通知
|
// 2. 发送本地通知
|
||||||
|
@@ -77,6 +77,8 @@
|
|||||||
#import "XPRoomRankEntranceView.h"
|
#import "XPRoomRankEntranceView.h"
|
||||||
#import "XPRoomAnchorRankEnterView.h"
|
#import "XPRoomAnchorRankEnterView.h"
|
||||||
#import "MSRoomOnLineView.h"
|
#import "MSRoomOnLineView.h"
|
||||||
|
#import "XPTurboModeConstants.h"
|
||||||
|
#import "../MoreView/Manager/TurboModeStateManager.h"
|
||||||
|
|
||||||
#import "BannerScheduler.h"
|
#import "BannerScheduler.h"
|
||||||
#import "GameBannerGestureManager.h"
|
#import "GameBannerGestureManager.h"
|
||||||
@@ -162,7 +164,7 @@ BannerSchedulerDelegate
|
|||||||
/// --- 旧逻辑,有需要再重构
|
/// --- 旧逻辑,有需要再重构
|
||||||
@property(nonatomic, assign) BOOL isPlayOfB;
|
@property(nonatomic, assign) BOOL isPlayOfB;
|
||||||
@property(nonatomic, strong) NSMutableArray<PIBaseAnimationViewModel *> *animationListB; // 玩法
|
@property(nonatomic, strong) NSMutableArray<PIBaseAnimationViewModel *> *animationListB; // 玩法
|
||||||
@property(nonatomic, assign) CGFloat broadCastHieght;
|
@property (nonatomic, assign) CGFloat broadCastHieght;
|
||||||
@property (nonatomic, strong) NetImageView *imageLoader;
|
@property (nonatomic, strong) NetImageView *imageLoader;
|
||||||
@property (nonatomic, strong) SVGAImageView *datingEffectView;
|
@property (nonatomic, strong) SVGAImageView *datingEffectView;
|
||||||
@property (nonatomic, strong) NSMutableArray<AttachmentModel *> *sailingQueue;
|
@property (nonatomic, strong) NSMutableArray<AttachmentModel *> *sailingQueue;
|
||||||
@@ -183,6 +185,12 @@ BannerSchedulerDelegate
|
|||||||
|
|
||||||
@property (nonatomic, strong) UISwipeGestureRecognizer *swipeWhenPlayGame;
|
@property (nonatomic, strong) UISwipeGestureRecognizer *swipeWhenPlayGame;
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo Mode 开关状态
|
||||||
|
@property (nonatomic, assign) BOOL turboGiftEffectsEnabled; // 临时礼物特效状态
|
||||||
|
@property (nonatomic, assign) BOOL turboGlobalGiftScreenEnabled; // 全局礼物屏幕状态
|
||||||
|
@property (nonatomic, assign) BOOL turboGlobalGameScreenEnabled; // 全局游戏屏幕状态
|
||||||
|
@property (nonatomic, strong) NSString *currentRoomId; // 当前房间 ID
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation RoomAnimationView
|
@implementation RoomAnimationView
|
||||||
@@ -381,6 +389,12 @@ BannerSchedulerDelegate
|
|||||||
selector:@selector(handleRoomTypeChanged:)
|
selector:@selector(handleRoomTypeChanged:)
|
||||||
name:@"RoomTypeChanged"
|
name:@"RoomTypeChanged"
|
||||||
object:nil];
|
object:nil];
|
||||||
|
|
||||||
|
// 🔧 新增:初始化Turbo Mode开关状态
|
||||||
|
[self setupTurboModeSwitches];
|
||||||
|
|
||||||
|
// 🔧 新增:监听Turbo Mode开关变化
|
||||||
|
[self setupTurboModeNotifications];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setupUI {
|
- (void)setupUI {
|
||||||
@@ -441,6 +455,90 @@ BannerSchedulerDelegate
|
|||||||
_animationListB = @[].mutableCopy;
|
_animationListB = @[].mutableCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:初始化Turbo Mode开关状态
|
||||||
|
- (void)setupTurboModeSwitches {
|
||||||
|
NSString *roomId = @(self.hostDelegate.getRoomInfo.roomId).stringValue;
|
||||||
|
self.currentRoomId = roomId;
|
||||||
|
|
||||||
|
// 1. 先按原逻辑获取状态
|
||||||
|
[self loadSwitchStatesFromCache:roomId];
|
||||||
|
|
||||||
|
// 2. 再按 turbo mode 来调整状态
|
||||||
|
[[TurboModeStateManager sharedManager] applyTurboModeToSwitchesForRoom:roomId];
|
||||||
|
|
||||||
|
// 3. 强制更新本地状态,确保与 turbo mode 一致
|
||||||
|
[self forceUpdateLocalSwitchStates:roomId];
|
||||||
|
|
||||||
|
NSLog(@"🎮 RoomAnimationView Turbo Mode开关初始化完成 - 房间ID: %@", roomId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:从缓存加载开关状态
|
||||||
|
- (void)loadSwitchStatesFromCache:(NSString *)roomId {
|
||||||
|
// 礼物特效:从当前会话状态读取(不持久化)
|
||||||
|
self.turboGiftEffectsEnabled = self.hostDelegate.getRoomInfo.hasAnimationEffect;
|
||||||
|
|
||||||
|
// 其他两个开关:从房间特定的 NSUserDefaults 读取(区分未设置与显式 NO)
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||||
|
self.turboGlobalGiftScreenEnabled = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : YES;
|
||||||
|
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||||
|
self.turboGlobalGameScreenEnabled = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:更新本地开关状态
|
||||||
|
- (void)updateLocalSwitchStates:(NSString *)roomId {
|
||||||
|
NSDictionary *switchStates = [[TurboModeStateManager sharedManager] getSwitchStatesAfterTurboModeForRoom:roomId];
|
||||||
|
|
||||||
|
if (switchStates.count > 0) {
|
||||||
|
self.turboGiftEffectsEnabled = [switchStates[@"giftEffects"] boolValue];
|
||||||
|
self.turboGlobalGiftScreenEnabled = [switchStates[@"globalGiftScreen"] boolValue];
|
||||||
|
self.turboGlobalGameScreenEnabled = [switchStates[@"globalGameScreen"] boolValue];
|
||||||
|
|
||||||
|
NSLog(@"🎮 RoomAnimationView 开关状态已更新 - 礼物特效: %@, 全局礼物屏幕: %@, 全局游戏屏幕: %@",
|
||||||
|
self.turboGiftEffectsEnabled ? @"开启" : @"关闭",
|
||||||
|
self.turboGlobalGiftScreenEnabled ? @"开启" : @"关闭",
|
||||||
|
self.turboGlobalGameScreenEnabled ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:强制更新本地开关状态,确保与 turbo mode 一致
|
||||||
|
- (void)forceUpdateLocalSwitchStates:(NSString *)roomId {
|
||||||
|
// 直接获取 turbo mode 状态并强制设置
|
||||||
|
BOOL turboModeEnabled = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||||
|
|
||||||
|
if (turboModeEnabled) {
|
||||||
|
// turbo mode = YES,强制关闭所有开关
|
||||||
|
self.turboGiftEffectsEnabled = NO;
|
||||||
|
self.turboGlobalGiftScreenEnabled = NO;
|
||||||
|
self.turboGlobalGameScreenEnabled = NO;
|
||||||
|
|
||||||
|
NSLog(@"🎮 RoomAnimationView 强制更新开关状态 - Turbo Mode 开启,所有开关已关闭");
|
||||||
|
} else {
|
||||||
|
// turbo mode = NO,使用原有逻辑
|
||||||
|
[self updateLocalSwitchStates:roomId];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:设置Turbo Mode通知监听
|
||||||
|
- (void)setupTurboModeNotifications {
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(handleTurboGiftEffectsChanged:)
|
||||||
|
name:kTurboGiftEffectsEnabledChanged
|
||||||
|
object:nil];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(handleTurboGlobalGiftScreenChanged:)
|
||||||
|
name:kTurboGlobalGiftScreenEnabledChanged
|
||||||
|
object:nil];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(handleTurboGlobalGameScreenChanged:)
|
||||||
|
name:kTurboGlobalGameScreenEnabledChanged
|
||||||
|
object:nil];
|
||||||
|
|
||||||
|
NSLog(@"🎮 Turbo Mode通知监听设置完成");
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - Method: Enter Roooooom
|
#pragma mark - Method: Enter Roooooom
|
||||||
- (void)enterRoom:(NIMMessage *)message content:(NIMChatroomNotificationContent *)content {
|
- (void)enterRoom:(NIMMessage *)message content:(NIMChatroomNotificationContent *)content {
|
||||||
NIMMessageChatroomExtension *messageExt = (NIMMessageChatroomExtension *)message.messageExt;
|
NIMMessageChatroomExtension *messageExt = (NIMMessageChatroomExtension *)message.messageExt;
|
||||||
@@ -533,6 +631,12 @@ BannerSchedulerDelegate
|
|||||||
effectPath:(NSString *)effectPath
|
effectPath:(NSString *)effectPath
|
||||||
isCPEnter:(BOOL)isCP {
|
isCPEnter:(BOOL)isCP {
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo Mode进房特效开关检查
|
||||||
|
if (!self.turboGiftEffectsEnabled) {
|
||||||
|
NSLog(@"🎮 Turbo Mode进房特效已关闭,跳过进房动画");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NSDictionary *attributes = @{
|
NSDictionary *attributes = @{
|
||||||
NSFontAttributeName:kFontRegular(26),
|
NSFontAttributeName:kFontRegular(26),
|
||||||
NSForegroundColorAttributeName:[UIColor whiteColor]
|
NSForegroundColorAttributeName:[UIColor whiteColor]
|
||||||
@@ -657,6 +761,24 @@ BannerSchedulerDelegate
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo Mode Banner开关检查
|
||||||
|
if (obj.second == Custom_Message_Sub_General_Floating_Screen_One_Room ||
|
||||||
|
obj.second == Custom_Message_Sub_General_Floating_Screen_All_Room) {
|
||||||
|
// 游戏相关banner
|
||||||
|
if (!self.turboGlobalGameScreenEnabled) {
|
||||||
|
NSLog(@"🎮 Turbo Mode全局游戏屏幕已关闭,跳过游戏banner");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (obj.second == Custom_Message_Sub_Super_Gift_Banner ||
|
||||||
|
obj.second == Custom_Message_Sub_Gift_ChannelNotify ||
|
||||||
|
obj.second == Custom_Message_Sub_LuckyPackage) {
|
||||||
|
// 礼物相关banner
|
||||||
|
if (!self.turboGlobalGiftScreenEnabled) {
|
||||||
|
NSLog(@"🎮 Turbo Mode全局礼物屏幕已关闭,跳过礼物banner");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// DEBUG环境:复制banner数据用于测试
|
// DEBUG环境:复制banner数据用于测试
|
||||||
BOOL enableBannerCopy = obj.second == Custom_Message_Sub_Super_Gift_Banner;// YES; // 设置为NO可以禁用复制功能
|
BOOL enableBannerCopy = obj.second == Custom_Message_Sub_Super_Gift_Banner;// YES; // 设置为NO可以禁用复制功能
|
||||||
@@ -855,6 +977,12 @@ BannerSchedulerDelegate
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)receiveRoomGiftBanner:(AttachmentModel *)obj {
|
- (void)receiveRoomGiftBanner:(AttachmentModel *)obj {
|
||||||
|
// 🔧 新增:检查 Turbo Mode 全局礼物屏幕开关
|
||||||
|
if (!self.turboGlobalGiftScreenEnabled) {
|
||||||
|
NSLog(@"🎮 RoomAnimationView 全局礼物屏幕已关闭,跳过 RoomGiftBanner");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
[self inserBannerModelToQueue:obj];
|
[self inserBannerModelToQueue:obj];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -881,6 +1009,12 @@ BannerSchedulerDelegate
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)receiveCPEvent:(AttachmentModel *)attachment {
|
- (void)receiveCPEvent:(AttachmentModel *)attachment {
|
||||||
|
// 🔧 新增:检查 Turbo Mode 礼物特效开关
|
||||||
|
if (!self.turboGiftEffectsEnabled) {
|
||||||
|
NSLog(@"🎮 RoomAnimationView 礼物特效已关闭,跳过CP动画");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
[self inserBannerModelToQueue:attachment];
|
[self inserBannerModelToQueue:attachment];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1076,6 +1210,12 @@ BannerSchedulerDelegate
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)receiveLuckGiftBanner:(AttachmentModel *)attachment {
|
- (void)receiveLuckGiftBanner:(AttachmentModel *)attachment {
|
||||||
|
// 🔧 新增:检查 Turbo Mode 全局礼物屏幕开关
|
||||||
|
if (!self.turboGlobalGiftScreenEnabled) {
|
||||||
|
NSLog(@"🎮 RoomAnimationView 全局礼物屏幕已关闭,跳过 LuckyGiftWinningBanner");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
[self inserBannerModelToQueue:attachment];
|
[self inserBannerModelToQueue:attachment];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1121,6 +1261,12 @@ BannerSchedulerDelegate
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)receiveGameBanner:(AttachmentModel *)attachment {
|
- (void)receiveGameBanner:(AttachmentModel *)attachment {
|
||||||
|
// 🔧 新增:检查 Turbo Mode 全局游戏屏幕开关
|
||||||
|
if (!self.turboGlobalGameScreenEnabled) {
|
||||||
|
NSLog(@"🎮 RoomAnimationView 全局游戏屏幕已关闭,跳过 GameBanner");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
[self inserBannerModelToQueue:attachment];
|
[self inserBannerModelToQueue:attachment];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1254,6 +1400,12 @@ BannerSchedulerDelegate
|
|||||||
|
|
||||||
#pragma mark - Method: Send Gifts
|
#pragma mark - Method: Send Gifts
|
||||||
- (void)receiveGiftHandleSendGiftAnimationWith:(GiftReceiveInfoModel *)receiveInfo attachment:(AttachmentModel *)attachment {
|
- (void)receiveGiftHandleSendGiftAnimationWith:(GiftReceiveInfoModel *)receiveInfo attachment:(AttachmentModel *)attachment {
|
||||||
|
// 🔧 新增:检查 Turbo Mode 礼物特效开关
|
||||||
|
if (!self.turboGiftEffectsEnabled) {
|
||||||
|
NSLog(@"🎮 RoomAnimationView 礼物特效已关闭,跳过动画");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!self.hostDelegate.getRoomInfo.hasAnimationEffect) {
|
if (!self.hostDelegate.getRoomInfo.hasAnimationEffect) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3786,6 +3938,89 @@ BannerSchedulerDelegate
|
|||||||
NSLog(@"🔄 缓存管理器清理完成");
|
NSLog(@"🔄 缓存管理器清理完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:清理礼物特效
|
||||||
|
- (void)cleanupGiftEffects {
|
||||||
|
NSLog(@"🎮 清理礼物特效");
|
||||||
|
|
||||||
|
// 停止当前播放的礼物特效
|
||||||
|
if (self.isPlayingGiftEffect) {
|
||||||
|
self.isPlayingGiftEffect = NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理礼物特效视图
|
||||||
|
if (self.pagGiftEffectView && self.pagGiftEffectView.superview) {
|
||||||
|
[self.pagGiftEffectView stop];
|
||||||
|
[self.pagGiftEffectView removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.vapGiftEffectView && self.vapGiftEffectView.superview) {
|
||||||
|
[self.vapGiftEffectView stopHWDMP4];
|
||||||
|
[self.vapGiftEffectView removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.vggGiftEffectView && self.vggGiftEffectView.superview) {
|
||||||
|
[self.vggGiftEffectView stopAnimation];
|
||||||
|
[self.vggGiftEffectView removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空礼物队列
|
||||||
|
[self.svgaQueue removeAllObjects];
|
||||||
|
|
||||||
|
NSLog(@"🎮 礼物特效清理完成");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:清理礼物相关banner
|
||||||
|
- (void)cleanupGiftBanners {
|
||||||
|
NSLog(@"🎮 清理礼物相关banner");
|
||||||
|
|
||||||
|
// 清理礼物相关的banner
|
||||||
|
NSMutableArray *viewsToRemove = [NSMutableArray array];
|
||||||
|
for (UIView *subview in self.bannerContainer.subviews) {
|
||||||
|
if ([subview isKindOfClass:[BravoGiftBannerView class]] ||
|
||||||
|
[subview isKindOfClass:[LuckyGiftWinningBannerView class]] ||
|
||||||
|
[subview isKindOfClass:[RoomHighValueGiftBannerAnimation class]]) {
|
||||||
|
[viewsToRemove addObject:subview];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (UIView *view in viewsToRemove) {
|
||||||
|
[view removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标记banner播放完成,继续下一个
|
||||||
|
if (self.isRoomBannerV2Displaying) {
|
||||||
|
self.isRoomBannerV2Displaying = NO;
|
||||||
|
[self.bannerScheduler markBannerFinished];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"🎮 礼物相关banner清理完成");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:清理游戏相关banner
|
||||||
|
- (void)cleanupGameBanners {
|
||||||
|
NSLog(@"🎮 清理游戏相关banner");
|
||||||
|
|
||||||
|
// 清理游戏相关的banner
|
||||||
|
NSMutableArray *viewsToRemove = [NSMutableArray array];
|
||||||
|
for (UIView *subview in self.bannerContainer.subviews) {
|
||||||
|
if ([subview isKindOfClass:[GameUniversalBannerView class]]) {
|
||||||
|
[viewsToRemove addObject:subview];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (UIView *view in viewsToRemove) {
|
||||||
|
[view removeFromSuperview];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 标记banner播放完成,继续下一个
|
||||||
|
if (self.isRoomBannerV2Displaying) {
|
||||||
|
self.isRoomBannerV2Displaying = NO;
|
||||||
|
[self.bannerScheduler markBannerFinished];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"🎮 游戏相关banner清理完成");
|
||||||
|
}
|
||||||
|
|
||||||
- (void)cleanupBannerScheduler {
|
- (void)cleanupBannerScheduler {
|
||||||
if (self.bannerScheduler) {
|
if (self.bannerScheduler) {
|
||||||
NSLog(@"<22><> 清理 BannerScheduler");
|
NSLog(@"<22><> 清理 BannerScheduler");
|
||||||
@@ -3806,6 +4041,11 @@ BannerSchedulerDelegate
|
|||||||
// 🔧 新增:移除房间类型变化通知监听
|
// 🔧 新增:移除房间类型变化通知监听
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"RoomTypeChanged" object:nil];
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"RoomTypeChanged" object:nil];
|
||||||
|
|
||||||
|
// 🔧 新增:移除Turbo Mode通知监听
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:kTurboGiftEffectsEnabledChanged object:nil];
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:kTurboGlobalGiftScreenEnabledChanged object:nil];
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self name:kTurboGlobalGameScreenEnabledChanged object:nil];
|
||||||
|
|
||||||
// 移除其他可能添加的通知监听
|
// 移除其他可能添加的通知监听
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
|
|
||||||
@@ -4023,6 +4263,45 @@ BannerSchedulerDelegate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:处理Turbo Mode礼物特效开关变化
|
||||||
|
- (void)handleTurboGiftEffectsChanged:(NSNotification *)notification {
|
||||||
|
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||||
|
self.turboGiftEffectsEnabled = enabled;
|
||||||
|
|
||||||
|
// 如果关闭,清理当前效果
|
||||||
|
if (!enabled) {
|
||||||
|
[self cleanupGiftEffects];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"🎮 RoomAnimationView 礼物特效状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:处理Turbo Mode全局礼物屏幕开关变化
|
||||||
|
- (void)handleTurboGlobalGiftScreenChanged:(NSNotification *)notification {
|
||||||
|
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||||
|
self.turboGlobalGiftScreenEnabled = enabled;
|
||||||
|
|
||||||
|
// 如果关闭,清理礼物相关 banner
|
||||||
|
if (!enabled) {
|
||||||
|
[self cleanupGiftBanners];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"🎮 RoomAnimationView 全局礼物屏幕状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:处理Turbo Mode全局游戏屏幕开关变化
|
||||||
|
- (void)handleTurboGlobalGameScreenChanged:(NSNotification *)notification {
|
||||||
|
BOOL enabled = [notification.userInfo[@"on"] boolValue];
|
||||||
|
self.turboGlobalGameScreenEnabled = enabled;
|
||||||
|
|
||||||
|
// 如果关闭,清理游戏相关 banner
|
||||||
|
if (!enabled) {
|
||||||
|
[self cleanupGameBanners];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSLog(@"🎮 RoomAnimationView 全局游戏屏幕状态变化: %@", enabled ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
|
||||||
// 🔧 新增:检查重要动画状态
|
// 🔧 新增:检查重要动画状态
|
||||||
- (BOOL)hasImportantAnimationPlaying {
|
- (BOOL)hasImportantAnimationPlaying {
|
||||||
// 检查 topContainer 中是否有正在播放的重要动画
|
// 检查 topContainer 中是否有正在播放的重要动画
|
||||||
|
@@ -1,41 +0,0 @@
|
|||||||
//
|
|
||||||
// XPGiftEffectAction.m
|
|
||||||
// YuMi
|
|
||||||
//
|
|
||||||
// Created by Linus on 2025/1/13.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "XPGiftEffectAction.h"
|
|
||||||
#import "RoomInfoModel.h"
|
|
||||||
|
|
||||||
@implementation XPGiftEffectAction
|
|
||||||
|
|
||||||
+ (instancetype)openAction {
|
|
||||||
XPGiftEffectAction *action = [[XPGiftEffectAction alloc] init];
|
|
||||||
action.title = YMLocalizedString(@"XPMoreMenuPresenter5");
|
|
||||||
action.imageName = @"room_more_menu_gift_effect";
|
|
||||||
action.type = RoomMoreMenuType_Gift_Effect_Open;
|
|
||||||
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ (instancetype)closeAction {
|
|
||||||
XPGiftEffectAction *action = [[XPGiftEffectAction alloc] init];
|
|
||||||
action.title = YMLocalizedString(@"XPMoreMenuPresenter28");
|
|
||||||
action.imageName = @"room_more_menu_gift_effect";
|
|
||||||
action.type = RoomMoreMenuType_Gift_Effect_Close;
|
|
||||||
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 根据房间状态创建对应的 Action
|
|
||||||
+ (instancetype)actionWithRoomInfo:(RoomInfoModel *)roomInfo {
|
|
||||||
if (roomInfo.hasAnimationEffect) {
|
|
||||||
return [self closeAction];
|
|
||||||
} else {
|
|
||||||
return [self openAction];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
|
@@ -0,0 +1,24 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeAction.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2025/9/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "../Model/XPRoomMoreMenuAction.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turbo模式操作
|
||||||
|
*/
|
||||||
|
@interface XPRoomEffectAction : XPRoomMoreMenuAction
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建Turbo模式操作
|
||||||
|
*/
|
||||||
|
+ (instancetype)action;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeAction.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2025/9/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPRoomEffectAction.h"
|
||||||
|
|
||||||
|
@implementation XPRoomEffectAction
|
||||||
|
|
||||||
|
+ (instancetype)action {
|
||||||
|
XPRoomEffectAction *action = [[XPRoomEffectAction alloc] init];
|
||||||
|
action.title = YMLocalizedString(@"20.20.62_text_14");
|
||||||
|
action.imageName = @"room_more_menu_gift_effect";
|
||||||
|
action.type = RoomMoreMenuType_MyAnimationEffects_Mode;
|
||||||
|
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/**
|
/**
|
||||||
* 礼物特效开关操作
|
* 礼物特效开关操作
|
||||||
*/
|
*/
|
||||||
@interface XPGiftEffectAction : XPRoomMoreMenuAction
|
@interface XPTurboModeAction : XPRoomMoreMenuAction
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建开启礼物特效的操作
|
* 创建开启礼物特效的操作
|
47
YuMi/Modules/YMRoom/View/MoreView/Action/XPTurboModeAction.m
Normal file
47
YuMi/Modules/YMRoom/View/MoreView/Action/XPTurboModeAction.m
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
//
|
||||||
|
// XPGiftEffectAction.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by Linus on 2025/1/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPTurboModeAction.h"
|
||||||
|
#import "RoomInfoModel.h"
|
||||||
|
#import "../Manager/TurboModeStateManager.h"
|
||||||
|
|
||||||
|
@implementation XPTurboModeAction
|
||||||
|
|
||||||
|
+ (instancetype)openAction {
|
||||||
|
XPTurboModeAction *action = [[XPTurboModeAction alloc] init];
|
||||||
|
action.title = YMLocalizedString(@"20.20.62_text_9.1");
|
||||||
|
action.imageName = @"icon_turbo_mode";
|
||||||
|
action.type = Room_Turbo_Mode_Open;
|
||||||
|
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype)closeAction {
|
||||||
|
XPTurboModeAction *action = [[XPTurboModeAction alloc] init];
|
||||||
|
action.title = YMLocalizedString(@"20.20.62_text_9.2");
|
||||||
|
action.imageName = @"icon_turbo_mode";
|
||||||
|
action.type = Room_Turbo_Mode_Close;
|
||||||
|
action.titleColor = [DJDKMIMOMColor appCellBackgroundColor];
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据全局 turbo mode 状态创建对应的 Action
|
||||||
|
+ (instancetype)actionWithRoomInfo:(RoomInfoModel *)roomInfo {
|
||||||
|
// 导入 TurboModeStateManager 头文件
|
||||||
|
BOOL turboModeEnabled = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||||
|
|
||||||
|
if (turboModeEnabled) {
|
||||||
|
// turbo mode 已开启,显示关闭 Action
|
||||||
|
return [self closeAction];
|
||||||
|
} else {
|
||||||
|
// turbo mode 已关闭,显示开启 Action
|
||||||
|
return [self openAction];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/**
|
/**
|
||||||
* 房间更多菜单操作工厂类
|
* 房间更多菜单操作工厂类
|
||||||
* 负责根据上下文创建合适的操作列表
|
* 负责根据上下文创建合适的操作列表
|
||||||
|
* 原意是替换通过 action 替换 item model,并将点击后的事件也封装到 action
|
||||||
*/
|
*/
|
||||||
@interface XPRoomMoreMenuActionFactory : NSObject
|
@interface XPRoomMoreMenuActionFactory : NSObject
|
||||||
|
|
||||||
@@ -23,13 +24,18 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
* @param context 操作上下文
|
* @param context 操作上下文
|
||||||
* @return 操作列表
|
* @return 操作列表
|
||||||
*/
|
*/
|
||||||
//+ (NSArray<XPRoomMoreMenuAction *> *)createActionsWithContext:(XPRoomMoreMenuActionContext *)context;
|
|
||||||
|
|
||||||
/// 超管直接回使用固定组合 models (trumpet, giftEffect, appManager, report)
|
/// 超管直接回使用固定组合 models (trumpet, giftEffect, appManager, report)
|
||||||
+ (NSArray<XPRoomMoreMenuAction *> *)createSuperAdminActionsWithContext:(XPRoomMoreMenuActionContext *)context;
|
+ (NSArray<XPRoomMoreMenuAction *> *)createSuperAdminActionsWithContext:(XPRoomMoreMenuActionContext *)context;
|
||||||
|
|
||||||
+ (NSArray<XPRoomMoreMenuAction *> *)createPanelActionsWithContext:(XPRoomMoreMenuActionContext *)context isCreator:(BOOL)isCreator isManager:(BOOL)isManager isSuperAdmin:(BOOL)isSuperAdmin isOnMic:(BOOL)isOnMic;
|
/// 普通用户需要综合判断
|
||||||
|
+ (NSArray<XPRoomMoreMenuAction *> *)createPanelActionsWithContext:(XPRoomMoreMenuActionContext *)context
|
||||||
|
isCreator:(BOOL)isCreator
|
||||||
|
isManager:(BOOL)isManager
|
||||||
|
isSuperAdmin:(BOOL)isSuperAdmin
|
||||||
|
isOnMic:(BOOL)isOnMic;
|
||||||
|
|
||||||
|
/// 没有取到云信用户数据的情况
|
||||||
+ (NSArray<XPRoomMoreMenuAction *> *)createPanelActionsForNoCharRoomMembersWithContext:(XPRoomMoreMenuActionContext *)context;
|
+ (NSArray<XPRoomMoreMenuAction *> *)createPanelActionsForNoCharRoomMembersWithContext:(XPRoomMoreMenuActionContext *)context;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#import "XPRoomMoreMenuActionFactory.h"
|
#import "XPRoomMoreMenuActionFactory.h"
|
||||||
#import "XPRoomMoreMenuActionContext.h"
|
#import "XPRoomMoreMenuActionContext.h"
|
||||||
#import "XPRoomMoreMenuAction.h"
|
#import "XPRoomMoreMenuAction.h"
|
||||||
#import "XPGiftEffectAction.h"
|
#import "XPTurboModeAction.h"
|
||||||
#import "XPRoomSettingAction.h"
|
#import "XPRoomSettingAction.h"
|
||||||
#import "XPRoomBackGroundSettingAction.h"
|
#import "XPRoomBackGroundSettingAction.h"
|
||||||
#import "XPSocialAction.h"
|
#import "XPSocialAction.h"
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
#import "XPRoomRoomPhotoAction.h"
|
#import "XPRoomRoomPhotoAction.h"
|
||||||
#import "XPRoomAppManagerAction.h"
|
#import "XPRoomAppManagerAction.h"
|
||||||
#import "XPRoomCleanMessagesAction.h"
|
#import "XPRoomCleanMessagesAction.h"
|
||||||
|
#import "XPRoomEffectAction.h"
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
#import "ClientConfig.h"
|
#import "ClientConfig.h"
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
NSMutableArray *actions = [NSMutableArray array];
|
NSMutableArray *actions = [NSMutableArray array];
|
||||||
|
|
||||||
[actions addObject:[XPSocialAction trumpetAction]];
|
[actions addObject:[XPSocialAction trumpetAction]];
|
||||||
[actions addObject:[XPGiftEffectAction actionWithRoomInfo:context.roomInfo]];
|
[actions addObject:[XPTurboModeAction actionWithRoomInfo:context.roomInfo]];
|
||||||
[actions addObject:[XPRoomAppManagerAction action]];
|
[actions addObject:[XPRoomAppManagerAction action]];
|
||||||
[actions addObject:[XPSocialAction reportAction]];
|
[actions addObject:[XPSocialAction reportAction]];
|
||||||
|
|
||||||
@@ -43,25 +44,30 @@
|
|||||||
NSMutableArray *actions = [NSMutableArray array];
|
NSMutableArray *actions = [NSMutableArray array];
|
||||||
RoomInfoModel *roomInfo = context.roomInfo;
|
RoomInfoModel *roomInfo = context.roomInfo;
|
||||||
RoomType type = roomInfo.type;
|
RoomType type = roomInfo.type;
|
||||||
|
BOOL userNotNormal = (isCreator || isManager || isSuperAdmin);
|
||||||
|
|
||||||
// 1. PK相关功能 - 按优先级顺序
|
// 1. PK相关功能 - 按优先级顺序
|
||||||
if ((isCreator || isManager || isSuperAdmin) &&
|
if (userNotNormal &&
|
||||||
type != RoomType_MiniGame && type != RoomType_Anchor) {
|
type != RoomType_MiniGame && type != RoomType_Anchor) {
|
||||||
[actions addObject:[XPPKAction roomPKActionWithRoomInfo:roomInfo]];
|
[actions addObject:[XPPKAction roomPKActionWithRoomInfo:roomInfo]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCreator && type != RoomType_MiniGame && type != RoomType_Anchor) {
|
if (isCreator &&
|
||||||
|
type != RoomType_MiniGame &&
|
||||||
|
type != RoomType_Anchor) {
|
||||||
[actions addObject:[XPPKAction corssPKActionWithRoomInfo:roomInfo]];
|
[actions addObject:[XPPKAction corssPKActionWithRoomInfo:roomInfo]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCreator && type == RoomType_Anchor) {
|
if (isCreator &&
|
||||||
|
type == RoomType_Anchor) {
|
||||||
[actions addObject:[XPPKAction anchorPKActionWithRoomInfo:roomInfo]];
|
[actions addObject:[XPPKAction anchorPKActionWithRoomInfo:roomInfo]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 相亲模式 - 插入到最前面
|
// 2. 相亲模式 - 插入到最前面
|
||||||
if ((isCreator || isManager || isSuperAdmin) &&
|
if (userNotNormal &&
|
||||||
roomInfo.canOpenBlindDate &&
|
roomInfo.canOpenBlindDate &&
|
||||||
type != RoomType_Anchor && type != RoomType_MiniGame) {
|
type != RoomType_Anchor &&
|
||||||
|
type != RoomType_MiniGame) {
|
||||||
[actions insertObject:[XPPKAction blindActionWithRoomInfo:roomInfo] atIndex:0];
|
[actions insertObject:[XPPKAction blindActionWithRoomInfo:roomInfo] atIndex:0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,25 +77,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 4. 基础功能 - 根据权限
|
// 4. 基础功能 - 根据权限
|
||||||
if (isCreator || isManager || isSuperAdmin) {
|
if (userNotNormal) {
|
||||||
[actions addObject:[XPSocialAction trumpetAction]];
|
[actions addObject:[XPSocialAction trumpetAction]];
|
||||||
[actions addObject:[XPGiftEffectAction actionWithRoomInfo:roomInfo]];
|
[actions addObject:[XPRoomEffectAction action]];
|
||||||
[actions addObject:[XPRoomSettingAction action]];
|
[actions addObject:[XPRoomSettingAction action]];
|
||||||
[actions addObject:[XPRoomBackGroundSettingAction action]];
|
[actions addObject:[XPRoomBackGroundSettingAction action]];
|
||||||
[actions addObject:[XPRoomCleanMessagesAction action]];
|
[actions addObject:[XPRoomCleanMessagesAction action]];
|
||||||
} else {
|
} else {
|
||||||
[actions addObject:[XPSocialAction trumpetAction]];
|
[actions addObject:[XPSocialAction trumpetAction]];
|
||||||
[actions addObject:[XPGiftEffectAction actionWithRoomInfo:roomInfo]];
|
[actions addObject:[XPRoomEffectAction action]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. 通用功能
|
// 5. 通用功能
|
||||||
[actions addObject:[XPSocialAction reportAction]];
|
[actions addObject:[XPSocialAction reportAction]];
|
||||||
|
|
||||||
// 6. 房间类型设置
|
// 6. 房间类型设置
|
||||||
if ((isCreator || isManager || isSuperAdmin) &&
|
if (userNotNormal &&
|
||||||
roomInfo.isPermitRoom != PermitRoomType_License &&
|
roomInfo.isPermitRoom != PermitRoomType_License &&
|
||||||
roomInfo.roomModeType != RoomModeType_Open_Blind &&
|
roomInfo.roomModeType != RoomModeType_Open_Blind &&
|
||||||
type != RoomType_MiniGame && type != RoomType_Anchor) {
|
type != RoomType_MiniGame &&
|
||||||
|
type != RoomType_Anchor) {
|
||||||
[actions addObject:[XPRoomTypeSettingAction action]];
|
[actions addObject:[XPRoomTypeSettingAction action]];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,10 +107,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 8. 红包功能 - 插入到指定位置
|
// 8. 红包功能 - 插入到指定位置
|
||||||
if ([ClientConfig shareConfig].configInfo.redEnvelopeConfig.open && roomInfo.redEnvelopeOpen) {
|
if ([ClientConfig shareConfig].configInfo.redEnvelopeConfig.open &&
|
||||||
|
roomInfo.redEnvelopeOpen) {
|
||||||
[actions insertObject:[XPRoomRedPacketAction action] atIndex:1];
|
[actions insertObject:[XPRoomRedPacketAction action] atIndex:1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 9. 极速模式
|
||||||
|
[actions addObject:[XPTurboModeAction actionWithRoomInfo:roomInfo]];
|
||||||
|
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +139,7 @@
|
|||||||
NSMutableArray *actions = [NSMutableArray array];
|
NSMutableArray *actions = [NSMutableArray array];
|
||||||
|
|
||||||
[actions addObject:[XPSocialAction trumpetAction]];
|
[actions addObject:[XPSocialAction trumpetAction]];
|
||||||
[actions addObject:[XPGiftEffectAction actionWithRoomInfo:context.roomInfo]];
|
[actions addObject:[XPTurboModeAction actionWithRoomInfo:context.roomInfo]];
|
||||||
[actions addObject:[XPRoomAppManagerAction action]];
|
[actions addObject:[XPRoomAppManagerAction action]];
|
||||||
[actions addObject:[XPSocialAction reportAction]];
|
[actions addObject:[XPSocialAction reportAction]];
|
||||||
|
|
||||||
|
@@ -0,0 +1,31 @@
|
|||||||
|
//
|
||||||
|
// TurboModeStateManager.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by Linus on 2025/1/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface TurboModeStateManager : NSObject
|
||||||
|
|
||||||
|
+ (instancetype)sharedManager;
|
||||||
|
|
||||||
|
// 全局 turbo mode 开关(不按房间)
|
||||||
|
- (void)setTurboModeEnabled:(BOOL)enabled;
|
||||||
|
- (BOOL)isTurboModeEnabled;
|
||||||
|
|
||||||
|
// 将当前全局 turbo mode 应用到指定房间的三个开关(礼物特效临时、两全局屏幕持久化)
|
||||||
|
- (void)applyTurboModeToSwitchesForRoom:(NSString *)roomId;
|
||||||
|
|
||||||
|
// 获取应用全局 turbo 后的房间三开关视图态
|
||||||
|
- (NSDictionary<NSString *, NSNumber *> *)getSwitchStatesAfterTurboModeForRoom:(NSString *)roomId;
|
||||||
|
|
||||||
|
// 重置全局 turbo mode
|
||||||
|
- (void)resetTurboMode;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,178 @@
|
|||||||
|
//
|
||||||
|
// TurboModeStateManager.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by Linus on 2025/1/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "TurboModeStateManager.h"
|
||||||
|
#import "../XPTurboModeConstants.h"
|
||||||
|
|
||||||
|
@interface TurboModeStateManager ()
|
||||||
|
|
||||||
|
@property (nonatomic, assign) BOOL globalTurboEnabled; // 全局 turbo 模式
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation TurboModeStateManager
|
||||||
|
|
||||||
|
#pragma mark - Singleton
|
||||||
|
|
||||||
|
+ (instancetype)sharedManager {
|
||||||
|
static TurboModeStateManager *instance = nil;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
instance = [[TurboModeStateManager alloc] init];
|
||||||
|
});
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)init {
|
||||||
|
if (self = [super init]) {
|
||||||
|
// 从全局缓存加载
|
||||||
|
self.globalTurboEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"TurboMode_Global"];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Public Methods
|
||||||
|
|
||||||
|
- (void)setTurboModeEnabled:(BOOL)enabled {
|
||||||
|
self.globalTurboEnabled = enabled;
|
||||||
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"TurboMode_Global"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
|
||||||
|
NSLog(@"🎮 TurboModeStateManager: 全局 turbo mode 设置为 %@", enabled ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)isTurboModeEnabled {
|
||||||
|
return self.globalTurboEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)applyTurboModeToSwitchesForRoom:(NSString *)roomId {
|
||||||
|
if (!roomId) return;
|
||||||
|
|
||||||
|
BOOL turboModeEnabled = [self isTurboModeEnabled];
|
||||||
|
|
||||||
|
if (turboModeEnabled) {
|
||||||
|
// turbo mode = YES,3个开关全部关闭
|
||||||
|
[self forceCloseAllSwitches:roomId];
|
||||||
|
NSLog(@"🎮 TurboModeStateManager: 应用 turbo mode,房间 %@ 的3个开关全部关闭", roomId);
|
||||||
|
} else {
|
||||||
|
// turbo mode = NO,按最新需求:全部开关打开
|
||||||
|
[self forceOpenAllSwitches:roomId];
|
||||||
|
NSLog(@"🎮 TurboModeStateManager: turbo mode 关闭,房间 %@ 的3个开关全部打开", roomId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSDictionary<NSString *, NSNumber *> *)getSwitchStatesAfterTurboModeForRoom:(NSString *)roomId {
|
||||||
|
if (!roomId) return @{};
|
||||||
|
|
||||||
|
BOOL turboModeEnabled = [self isTurboModeEnabled];
|
||||||
|
|
||||||
|
if (turboModeEnabled) {
|
||||||
|
// turbo mode = YES,3个开关全部关闭
|
||||||
|
return @{
|
||||||
|
@"giftEffects": @(NO),
|
||||||
|
@"globalGiftScreen": @(NO),
|
||||||
|
@"globalGameScreen": @(NO)
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
// turbo mode = NO,返回当前缓存的状态
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
// 礼物特效:按需求不持久化,这里默认开启(面板或 RoomAnimationView 会基于 roomInfo 决定)
|
||||||
|
BOOL giftEffects = YES;
|
||||||
|
|
||||||
|
// 全局礼物屏幕:从缓存读取
|
||||||
|
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||||
|
BOOL globalGiftScreen = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : YES;
|
||||||
|
|
||||||
|
// 全局游戏屏幕:从缓存读取
|
||||||
|
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||||
|
BOOL globalGameScreen = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : YES;
|
||||||
|
|
||||||
|
return @{
|
||||||
|
@"giftEffects": @(giftEffects),
|
||||||
|
@"globalGiftScreen": @(globalGiftScreen),
|
||||||
|
@"globalGameScreen": @(globalGameScreen)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)resetTurboMode {
|
||||||
|
self.globalTurboEnabled = NO;
|
||||||
|
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"TurboMode_Global"];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
NSLog(@"🎮 TurboModeStateManager: 全局 turbo mode 状态已重置");
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Private Methods
|
||||||
|
|
||||||
|
- (void)forceCloseAllSwitches:(NSString *)roomId {
|
||||||
|
if (!roomId) return;
|
||||||
|
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
// 强制关闭礼物特效开关:不持久化,只发通知
|
||||||
|
|
||||||
|
// 强制关闭全局礼物屏幕开关
|
||||||
|
[defaults setBool:NO forKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||||
|
|
||||||
|
// 强制关闭全局游戏屏幕开关
|
||||||
|
[defaults setBool:NO forKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||||
|
|
||||||
|
[defaults synchronize];
|
||||||
|
|
||||||
|
// 发送通知,让相关组件更新状态
|
||||||
|
[self sendSwitchStateChangeNotifications:roomId];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)forceOpenAllSwitches:(NSString *)roomId {
|
||||||
|
if (!roomId) return;
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
// 礼物特效:不持久化,只发通知
|
||||||
|
// 全局礼物屏幕和全局游戏屏幕:打开并持久化
|
||||||
|
[defaults setBool:YES forKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||||
|
[defaults setBool:YES forKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||||
|
[defaults synchronize];
|
||||||
|
// 通知三开关打开
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGiftEffectsEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{ @"on": @(YES), @"roomId": roomId }];
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGlobalGiftScreenEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{ @"on": @(YES), @"roomId": roomId }];
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGlobalGameScreenEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{ @"on": @(YES), @"roomId": roomId }];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sendSwitchStateChangeNotifications:(NSString *)roomId {
|
||||||
|
// 发送礼物特效开关状态变化通知
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGiftEffectsEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"on": @(NO), @"roomId": roomId}];
|
||||||
|
|
||||||
|
// 发送全局礼物屏幕开关状态变化通知
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGlobalGiftScreenEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"on": @(NO), @"roomId": roomId}];
|
||||||
|
|
||||||
|
// 发送全局游戏屏幕开关状态变化通知
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGlobalGameScreenEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"on": @(NO), @"roomId": roomId}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)loadTurboModeStatesFromCache {
|
||||||
|
// 不再按房间加载,已改为全局
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeTipsManager.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by AI Assistant
|
||||||
|
// Copyright © 2024 YuMi. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import "XPTurboModeTipsView.h"
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface XPTurboModeTipsManager : NSObject <XPTurboModeTipsViewDelegate>
|
||||||
|
|
||||||
|
+ (instancetype)sharedManager;
|
||||||
|
|
||||||
|
// 在房间中启动 Tips 监听
|
||||||
|
- (void)startTipsMonitoringInRoom;
|
||||||
|
|
||||||
|
// 停止 Tips 监听
|
||||||
|
- (void)stopTipsMonitoring;
|
||||||
|
|
||||||
|
// 手动显示 Tips(用于测试)
|
||||||
|
- (void)showTipsManually;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,168 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeTipsManager.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by AI Assistant
|
||||||
|
// Copyright © 2024 YuMi. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPTurboModeTipsManager.h"
|
||||||
|
#import "XPTurboModeTipsView.h"
|
||||||
|
|
||||||
|
@interface XPTurboModeTipsManager ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) XPTurboModeTipsView *currentTipsView;
|
||||||
|
@property (nonatomic, assign) BOOL isMonitoring;
|
||||||
|
@property (nonatomic, assign) BOOL hasShownTipsInCurrentSession;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XPTurboModeTipsManager
|
||||||
|
|
||||||
|
#pragma mark - Singleton
|
||||||
|
|
||||||
|
+ (instancetype)sharedManager {
|
||||||
|
static XPTurboModeTipsManager *instance = nil;
|
||||||
|
static dispatch_once_t onceToken;
|
||||||
|
dispatch_once(&onceToken, ^{
|
||||||
|
instance = [[XPTurboModeTipsManager alloc] init];
|
||||||
|
});
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)init {
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
_isMonitoring = NO;
|
||||||
|
_hasShownTipsInCurrentSession = NO;
|
||||||
|
[self setupNotifications];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Public Methods
|
||||||
|
|
||||||
|
- (void)startTipsMonitoringInRoom {
|
||||||
|
if (self.isMonitoring) {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 已经在监听中");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isMonitoring = YES;
|
||||||
|
self.hasShownTipsInCurrentSession = NO;
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 开始在房间中监听卡顿");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)stopTipsMonitoring {
|
||||||
|
if (!self.isMonitoring) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.isMonitoring = NO;
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 停止监听卡顿");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showTipsManually {
|
||||||
|
[self showTipsWithReason:@"手动触发"];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Private Methods
|
||||||
|
|
||||||
|
- (void)setupNotifications {
|
||||||
|
// 监听卡顿检测通知
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(handleLagDetection:)
|
||||||
|
name:@"BuglyManagerDidDetectLag"
|
||||||
|
object:nil];
|
||||||
|
|
||||||
|
// 监听房间退出通知
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||||
|
selector:@selector(handleRoomExit:)
|
||||||
|
name:@"RoomDidExit"
|
||||||
|
object:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)handleLagDetection:(NSNotification *)notification {
|
||||||
|
if (!self.isMonitoring) {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 未在监听状态,跳过卡顿处理");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (self.hasShownTipsInCurrentSession) {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 当前会话已显示过 Tips,跳过");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSDictionary *userInfo = notification.userInfo;
|
||||||
|
NSTimeInterval duration = [userInfo[@"duration"] doubleValue];
|
||||||
|
NSString *stackTrace = userInfo[@"stackTrace"];
|
||||||
|
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 收到卡顿通知 - 持续时间: %.2f秒", duration);
|
||||||
|
|
||||||
|
// 延迟显示 Tips,避免在卡顿期间立即显示
|
||||||
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
[self showTipsWithReason:[NSString stringWithFormat:@"检测到卡顿 (%.1fs)", duration]];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)handleRoomExit:(NSNotification *)notification {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 房间退出,停止监听");
|
||||||
|
[self stopTipsMonitoring];
|
||||||
|
|
||||||
|
// 关闭当前 Tips 弹窗
|
||||||
|
if (self.currentTipsView) {
|
||||||
|
[self.currentTipsView dismiss];
|
||||||
|
self.currentTipsView = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showTipsWithReason:(NSString *)reason {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 显示 Tips - 原因: %@", reason);
|
||||||
|
|
||||||
|
// 获取当前窗口来显示弹窗
|
||||||
|
UIWindow *window = [UIApplication sharedApplication].keyWindow;
|
||||||
|
if (!window) {
|
||||||
|
// 尝试获取其他窗口
|
||||||
|
NSArray *windows = [UIApplication sharedApplication].windows;
|
||||||
|
for (UIWindow *w in windows) {
|
||||||
|
if (w.isKeyWindow) {
|
||||||
|
window = w;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!window) {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 无法获取窗口,Tips 弹窗显示失败");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建并显示 Tips
|
||||||
|
self.currentTipsView = [XPTurboModeTipsView showInView:window];
|
||||||
|
self.currentTipsView.delegate = self;
|
||||||
|
|
||||||
|
// 标记已显示
|
||||||
|
self.hasShownTipsInCurrentSession = YES;
|
||||||
|
|
||||||
|
NSLog(@"🎮 Tips 弹窗创建成功,已添加到窗口");
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - XPTurboModeTipsViewDelegate
|
||||||
|
|
||||||
|
- (void)turboModeTipsViewDidTapUnderstand {
|
||||||
|
NSLog(@"🎮 XPTurboModeTipsManager 用户点击了 'I understand' 按钮");
|
||||||
|
|
||||||
|
// 关闭 Tips 弹窗
|
||||||
|
if (self.currentTipsView) {
|
||||||
|
[self.currentTipsView dismiss];
|
||||||
|
self.currentTipsView = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Dealloc
|
||||||
|
|
||||||
|
- (void)dealloc {
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@@ -19,9 +19,9 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
|
|||||||
// ///公屏开启
|
// ///公屏开启
|
||||||
// RoomMoreMenuType_Message_Screen_Open = 4,
|
// RoomMoreMenuType_Message_Screen_Open = 4,
|
||||||
// ///我的礼物特效关闭
|
// ///我的礼物特效关闭
|
||||||
RoomMoreMenuType_Gift_Effect_Close = 5,
|
Room_Turbo_Mode_Close = 5,
|
||||||
///我的礼物特效开启
|
///我的礼物特效开启
|
||||||
RoomMoreMenuType_Gift_Effect_Open = 6,
|
Room_Turbo_Mode_Open = 6,
|
||||||
///房间设置
|
///房间设置
|
||||||
RoomMoreMenuType_Room_Setting = 7,
|
RoomMoreMenuType_Room_Setting = 7,
|
||||||
///邀请粉丝
|
///邀请粉丝
|
||||||
@@ -66,6 +66,8 @@ typedef NS_ENUM(NSInteger, RoomMoreMenuType) {
|
|||||||
RoomMoreMenuType_Room_Music_Panel = 27,
|
RoomMoreMenuType_Room_Music_Panel = 27,
|
||||||
|
|
||||||
RoomMoreMenuType_App_Manager = 28,
|
RoomMoreMenuType_App_Manager = 28,
|
||||||
|
|
||||||
|
RoomMoreMenuType_MyAnimationEffects_Mode = 29,
|
||||||
};
|
};
|
||||||
|
|
||||||
@interface XPRoomMoreItemModel : PIBaseModel
|
@interface XPRoomMoreItemModel : PIBaseModel
|
||||||
|
@@ -11,26 +11,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@class RoomInfoModel;
|
@class RoomInfoModel;
|
||||||
@interface XPMoreMenuPresenter : BaseMvpPresenter
|
@interface XPMoreMenuPresenter : BaseMvpPresenter
|
||||||
|
|
||||||
|
///获取更多菜单
|
||||||
- (void)getMoreMenuDataSourceWithNewArchitecture:(RoomInfoModel *)roomInfo
|
- (void)getMoreMenuDataSourceWithNewArchitecture:(RoomInfoModel *)roomInfo
|
||||||
isSuperAdmin:(BOOL)isSuperAdmin
|
isSuperAdmin:(BOOL)isSuperAdmin
|
||||||
isOnMic:(BOOL)isOnMic
|
isOnMic:(BOOL)isOnMic
|
||||||
isAppSuperAdmin:(BOOL)isAppSuperAdmin;
|
isAppSuperAdmin:(BOOL)isAppSuperAdmin;
|
||||||
|
|
||||||
///获取更多菜单
|
|
||||||
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin isOnMic:(BOOL)isOnMic isAppSuperAdmin:(BOOL)isAppSuperAdmin;
|
|
||||||
|
|
||||||
/// 开启房间礼物值
|
|
||||||
/// @param roomUid 房间的uid
|
|
||||||
- (void)openRoomGiftValue:(NSString *)roomUid;
|
|
||||||
|
|
||||||
/// 关闭房间礼物值
|
|
||||||
/// @param roomUid 房间的uid
|
|
||||||
- (void)closeRoomGiftValue:(NSString *)roomUid;
|
|
||||||
|
|
||||||
/// 更新公屏状态
|
|
||||||
/// @param isCloseScreen 是否关闭公屏
|
|
||||||
/// @param roomId 房间的id
|
|
||||||
- (void)updateRoomMessageScreenState:(BOOL)isCloseScreen roomId:(NSString *)roomId;
|
|
||||||
|
|
||||||
/// 开启相亲模式
|
/// 开启相亲模式
|
||||||
/// @param roomUid 房主的uid
|
/// @param roomUid 房主的uid
|
||||||
@@ -43,8 +29,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
///获取房间广播模板内容
|
///获取房间广播模板内容
|
||||||
/// @param type 房间类型
|
/// @param type 房间类型
|
||||||
- (void)getRoomRadioMessageListWithType:(NSString *)type;
|
- (void)getRoomRadioMessageListWithType:(NSString *)type;
|
||||||
|
|
||||||
/// 获取房间VIP小喇叭信息
|
/// 获取房间VIP小喇叭信息
|
||||||
- (void)getRoomgetUserVipRoomTrumpet:(NSString *)roomUid;
|
- (void)getRoomgetUserVipRoomTrumpet:(NSString *)roomUid;
|
||||||
|
|
||||||
///结束个播跨房PK
|
///结束个播跨房PK
|
||||||
- (void)requestFinishAnchorPK:(NSString *)roundId;
|
- (void)requestFinishAnchorPK:(NSString *)roundId;
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
isOnMic:(BOOL)isOnMic
|
isOnMic:(BOOL)isOnMic
|
||||||
isAppSuperAdmin:(BOOL)isAppSuperAdmin {
|
isAppSuperAdmin:(BOOL)isAppSuperAdmin {
|
||||||
// 创建上下文
|
// 创建上下文
|
||||||
XPRoomMoreMenuActionContext *context = [XPRoomMoreMenuActionContext
|
XPRoomMoreMenuActionContext *context = [XPRoomMoreMenuActionContext
|
||||||
contextWithRoomInfo:roomInfo
|
contextWithRoomInfo:roomInfo
|
||||||
userInfo:nil
|
userInfo:nil
|
||||||
hostDelegate:nil
|
hostDelegate:nil
|
||||||
@@ -65,35 +65,35 @@
|
|||||||
isSuperAdmin:isSuperAdmin
|
isSuperAdmin:isSuperAdmin
|
||||||
isAppSuperAdmin:isAppSuperAdmin];
|
isAppSuperAdmin:isAppSuperAdmin];
|
||||||
|
|
||||||
if (isAppSuperAdmin) {
|
if (isAppSuperAdmin) {
|
||||||
// 超管使用固定组合
|
// 超管使用固定组合
|
||||||
NSArray<XPRoomMoreMenuAction *> *actions = [XPRoomMoreMenuActionFactory createSuperAdminActionsWithContext:context];
|
NSArray<XPRoomMoreMenuAction *> *actions = [XPRoomMoreMenuActionFactory createSuperAdminActionsWithContext:context];
|
||||||
|
[self convertActionsToModels:actions];
|
||||||
|
} else {
|
||||||
|
// 普通用户根据权限创建
|
||||||
|
@kWeakify(self);
|
||||||
|
[self loadNIMMemberData:^(NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||||
|
@kStrongify(self);
|
||||||
|
|
||||||
|
BOOL isCreator = NO;
|
||||||
|
BOOL isManager = NO;
|
||||||
|
|
||||||
|
if (members && members.count > 0) {
|
||||||
|
NIMChatroomMember *member = members.firstObject;
|
||||||
|
isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||||
|
isManager = member.type == NIMChatroomMemberTypeManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
NSArray<XPRoomMoreMenuAction *> *actions = [XPRoomMoreMenuActionFactory
|
||||||
|
createPanelActionsWithContext:context
|
||||||
|
isCreator:isCreator
|
||||||
|
isManager:isManager
|
||||||
|
isSuperAdmin:isSuperAdmin
|
||||||
|
isOnMic:isOnMic];
|
||||||
|
|
||||||
[self convertActionsToModels:actions];
|
[self convertActionsToModels:actions];
|
||||||
} else {
|
} withRoomInfo:roomInfo];
|
||||||
// 普通用户根据权限创建
|
}
|
||||||
@kWeakify(self);
|
|
||||||
[self loadNIMMemberData:^(NSArray<NIMChatroomMember *> * _Nullable members) {
|
|
||||||
@kStrongify(self);
|
|
||||||
|
|
||||||
BOOL isCreator = NO;
|
|
||||||
BOOL isManager = NO;
|
|
||||||
|
|
||||||
if (members && members.count > 0) {
|
|
||||||
NIMChatroomMember *member = members.firstObject;
|
|
||||||
isCreator = member.type == NIMChatroomMemberTypeCreator;
|
|
||||||
isManager = member.type == NIMChatroomMemberTypeManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
NSArray<XPRoomMoreMenuAction *> *actions = [XPRoomMoreMenuActionFactory
|
|
||||||
createPanelActionsWithContext:context
|
|
||||||
isCreator:isCreator
|
|
||||||
isManager:isManager
|
|
||||||
isSuperAdmin:isSuperAdmin
|
|
||||||
isOnMic:isOnMic];
|
|
||||||
|
|
||||||
[self convertActionsToModels:actions];
|
|
||||||
} withRoomInfo:roomInfo];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将 Action 转换为数据模型
|
// 将 Action 转换为数据模型
|
||||||
@@ -105,237 +105,6 @@
|
|||||||
[[self getView] getMoreMenuDataSuccess:models];
|
[[self getView] getMoreMenuDataSuccess:models];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin isOnMic:(BOOL)isOnMic isAppSuperAdmin:(BOOL)isAppSuperAdmin{
|
|
||||||
XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
roomPK.title = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ?YMLocalizedString(@"XPMoreMenuPresenter26") : YMLocalizedString(@"XPMoreMenuPresenter1");
|
|
||||||
roomPK.imageName= @"room_pk_menu_icon";
|
|
||||||
roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
|
|
||||||
roomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * acrossRoomPK = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
acrossRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter30") : YMLocalizedString(@"XPMoreMenuPresenter31");
|
|
||||||
acrossRoomPK.imageName = @"crossroom_pk_menu_icon";
|
|
||||||
acrossRoomPK.type = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? RoomMoreMenuType_Room_Across_PK_Close : RoomMoreMenuType_Room_Across_PK_Open;
|
|
||||||
acrossRoomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel *bgValue = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
bgValue.title = YMLocalizedString(@"1.0.18_0");
|
|
||||||
bgValue.imageName= @"room_menu_background";
|
|
||||||
bgValue.type = RoomMoreMenuType_Room_Type_Background;
|
|
||||||
bgValue.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * giftEffect = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
giftEffect.title = roomInfo.hasAnimationEffect ? YMLocalizedString(@"XPMoreMenuPresenter28") : YMLocalizedString(@"XPMoreMenuPresenter5");
|
|
||||||
giftEffect.imageName = @"room_more_menu_gift_effect";
|
|
||||||
giftEffect.type = roomInfo.hasAnimationEffect ? RoomMoreMenuType_Gift_Effect_Close : RoomMoreMenuType_Gift_Effect_Open;
|
|
||||||
giftEffect.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * dating = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
dating.title = roomInfo.roomModeType == RoomModeType_Open_Blind ? YMLocalizedString(@"XPMoreMenuPresenter29") : YMLocalizedString(@"XPMoreMenuPresenter8");
|
|
||||||
dating.imageName = @"room_more_menu_dating";
|
|
||||||
dating.type = roomInfo.roomModeType == RoomModeType_Open_Blind ? RoomMoreMenuType_Room_Dating_Close : RoomMoreMenuType_Room_Dating_Open;
|
|
||||||
dating.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * anchorRoomPK = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
anchorRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter32") : YMLocalizedString(@"XPMoreMenuPresenter33");
|
|
||||||
anchorRoomPK.imageName = @"room_more_menu_anchor_pk";
|
|
||||||
anchorRoomPK.type = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? RoomMoreMenuType_Room_Anchor_PK_Close : RoomMoreMenuType_Room_Anchor_PK_Open;
|
|
||||||
anchorRoomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
if (roomInfo.pkState == AcrossRoomPkStateTypePenalty) {
|
|
||||||
if ([roomInfo.winUid isEqualToString:[AccountInfoStorage instance].getUid]) {
|
|
||||||
anchorRoomPK.title = YMLocalizedString(@"XPMoreMenuPresenter15");
|
|
||||||
} else if ([roomInfo.winUid isEqualToString:roomInfo.pkUid]) {
|
|
||||||
anchorRoomPK.title = YMLocalizedString(@"XPMoreMenuPresenter14");
|
|
||||||
} else {
|
|
||||||
anchorRoomPK.title = YMLocalizedString(@"XPMoreMenuPresenter15");
|
|
||||||
}
|
|
||||||
} else if (roomInfo.pkState == AcrossRoomPkStateTypePenaltyEnd) {
|
|
||||||
anchorRoomPK.title = YMLocalizedString(@"XPMoreMenuPresenter15");
|
|
||||||
}
|
|
||||||
if (roomInfo.pkMatchStartTime) {
|
|
||||||
anchorRoomPK.title = YMLocalizedString(@"XPMoreMenuPresenter17");
|
|
||||||
}
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * clearScreen = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
clearScreen.title = YMLocalizedString(@"XPMoreMenuPresenter20");
|
|
||||||
clearScreen.imageName = @"room_more_menu_message_clean";
|
|
||||||
clearScreen.type = RoomMoreMenuType_Message_Screen_Clear;
|
|
||||||
clearScreen.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * roomSetting = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
roomSetting.title = YMLocalizedString(@"XPMoreMenuPresenter21");
|
|
||||||
roomSetting.imageName = @"room_more_menu_setting";
|
|
||||||
roomSetting.type = RoomMoreMenuType_Room_Setting;
|
|
||||||
roomSetting.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * trumpet = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
trumpet.title = YMLocalizedString(@"XPMoreMenuPresenter35");
|
|
||||||
trumpet.imageName = @"room_more_menu_trumpet";
|
|
||||||
trumpet.type = RoomMoreMenuType_Room_trumpet;
|
|
||||||
trumpet.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * redPacket = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
redPacket.title = YMLocalizedString(@"XPMoreMenuPresenter24");
|
|
||||||
redPacket.imageName = @"pi_red_packet_entrance";
|
|
||||||
redPacket.type = RoomMoreMenuType_Room_redPacket;
|
|
||||||
redPacket.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * report = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
report.title = YMLocalizedString(@"XPMoreMenuPresenter36");
|
|
||||||
report.imageName = @"room_info_report";
|
|
||||||
report.type = RoomMoreMenuType_Room_report;
|
|
||||||
report.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * roomPhotoAlbum = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
roomPhotoAlbum.title = YMLocalizedString(@"XPMoreMenuPresenter37");
|
|
||||||
roomPhotoAlbum.imageName = @"room_info_photo_album";
|
|
||||||
roomPhotoAlbum.type = RoomMoreMenuType_Room_Room_Photo_Album;
|
|
||||||
roomPhotoAlbum.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * roomTypeSetting = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
roomTypeSetting.title = YMLocalizedString(@"XPMoreMenuPresenter25");
|
|
||||||
roomTypeSetting.imageName = @"room_type_selection_icon";
|
|
||||||
roomTypeSetting.type = RoomMoreMenuType_Room_Type_Setting;
|
|
||||||
roomTypeSetting.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel * musicPanel = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
musicPanel.title = YMLocalizedString(@"XPRoomMusicVoiceSettingView1");
|
|
||||||
musicPanel.imageName = @"menu_music";
|
|
||||||
musicPanel.type = RoomMoreMenuType_Room_Music_Panel;
|
|
||||||
musicPanel.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
|
|
||||||
|
|
||||||
XPRoomMoreItemModel *appManager = [[XPRoomMoreItemModel alloc] init];
|
|
||||||
appManager.type = RoomMoreMenuType_App_Manager;
|
|
||||||
appManager.title = YMLocalizedString(@"1.0.34_text_1");
|
|
||||||
appManager.imageName = @"app_admin_icon";
|
|
||||||
appManager.titleColor = [UIColor orangeColor];
|
|
||||||
|
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
||||||
if (uid.length <= 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
|
||||||
request.roomId = roomId;
|
|
||||||
request.userIds = @[uid];
|
|
||||||
|
|
||||||
if (isAppSuperAdmin) {
|
|
||||||
NSMutableArray * array = [NSMutableArray array];
|
|
||||||
[array addObject:trumpet];
|
|
||||||
[array addObject:giftEffect];
|
|
||||||
[array addObject:appManager];
|
|
||||||
[array addObject:report];
|
|
||||||
[[self getView] getMoreMenuDataSuccess:array];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
|
||||||
NSMutableArray * array = [NSMutableArray array];
|
|
||||||
BOOL isCreator = NO;
|
|
||||||
BOOL isManager = NO;
|
|
||||||
NSInteger indexOfRoomAlbum = 0;
|
|
||||||
if (error == nil) {
|
|
||||||
NIMChatroomMember * member = members.firstObject;
|
|
||||||
isCreator = member.type == NIMChatroomMemberTypeCreator;
|
|
||||||
isManager = member.type == NIMChatroomMemberTypeManager;
|
|
||||||
|
|
||||||
if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
|
|
||||||
[array addObject:roomPK];
|
|
||||||
indexOfRoomAlbum += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCreator && roomInfo.type != RoomType_MiniGame) {
|
|
||||||
if(roomInfo.type != RoomType_Anchor){
|
|
||||||
[array addObject:acrossRoomPK];
|
|
||||||
indexOfRoomAlbum += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isOnMic) {
|
|
||||||
[array addObject:musicPanel];
|
|
||||||
indexOfRoomAlbum += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCreator && roomInfo.type == RoomType_Anchor) {
|
|
||||||
[array addObject:anchorRoomPK];
|
|
||||||
indexOfRoomAlbum += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isCreator || isManager || isSuperAdmin) {
|
|
||||||
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {
|
|
||||||
[array insertObject:dating atIndex:0];
|
|
||||||
indexOfRoomAlbum += 1;
|
|
||||||
}
|
|
||||||
[array addObject:trumpet];
|
|
||||||
[array addObject:giftEffect];
|
|
||||||
[array addObject:roomSetting];
|
|
||||||
if (isCreator || isManager || isSuperAdmin) {
|
|
||||||
[array addObject:bgValue];
|
|
||||||
indexOfRoomAlbum += 1;
|
|
||||||
}
|
|
||||||
[array addObject:clearScreen];
|
|
||||||
} else {
|
|
||||||
[array addObject:trumpet];
|
|
||||||
[array addObject:giftEffect];
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
[array addObject:giftEffect];
|
|
||||||
}
|
|
||||||
|
|
||||||
[array addObject:report];
|
|
||||||
|
|
||||||
if ((isCreator || isManager || isSuperAdmin) && // 房主 & 管理
|
|
||||||
roomInfo.isPermitRoom != PermitRoomType_License && // 非牌照
|
|
||||||
roomInfo.roomModeType != RoomModeType_Open_Blind && // 非相亲
|
|
||||||
roomInfo.type != RoomType_MiniGame && // 非 10/15 麦
|
|
||||||
roomInfo.type != RoomType_Anchor) {
|
|
||||||
[array addObject:roomTypeSetting];
|
|
||||||
}
|
|
||||||
|
|
||||||
if(roomInfo.hasRoomAlbum == YES){
|
|
||||||
[array insertObject:roomPhotoAlbum atIndex:indexOfRoomAlbum];
|
|
||||||
}
|
|
||||||
if ([ClientConfig shareConfig].configInfo.redEnvelopeConfig.open && roomInfo.redEnvelopeOpen) {
|
|
||||||
[array insertObject:redPacket atIndex:1];
|
|
||||||
}
|
|
||||||
[[self getView] getMoreMenuDataSuccess:array];
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 开启房间礼物值
|
|
||||||
/// @param roomUid 房间的uid
|
|
||||||
- (void)openRoomGiftValue:(NSString *)roomUid {
|
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
||||||
[Api openRoomGiftValue:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
||||||
[[self getView] openRoomGiftValueSuccess];
|
|
||||||
}] uid:uid roomUid:roomUid];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 关闭房间礼物值
|
|
||||||
/// @param roomUid 房间的uid
|
|
||||||
- (void)closeRoomGiftValue:(NSString *)roomUid {
|
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
||||||
[Api closeRoomGiftValue:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
||||||
[[self getView] closeRoomGiftValueSuccess];
|
|
||||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
||||||
// NSLog(@"%@",msg);
|
|
||||||
}] uid:uid roomUid:roomUid];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// 更新公屏状态
|
|
||||||
/// @param isCloseScreen 是否关闭公屏
|
|
||||||
/// @param roomId 房间的id
|
|
||||||
- (void)updateRoomMessageScreenState:(BOOL)isCloseScreen roomId:(NSString *)roomId {
|
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
||||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
|
||||||
NSString * isCleScreenStr = isCloseScreen ? @"1" : @"0";
|
|
||||||
[Api updateRoomInfoMessageState:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
||||||
RoomInfoModel * roomInfo = [RoomInfoModel modelWithDictionary:data.data];
|
|
||||||
[[self getView] updateRoomMessageScreenStateSuccess:roomInfo];
|
|
||||||
}] roomId:roomId isCloseScreen:isCleScreenStr ticket:ticket uid:uid];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 开启相亲模式
|
/// 开启相亲模式
|
||||||
/// @param roomUid 房主的uid
|
/// @param roomUid 房主的uid
|
||||||
- (void)openRoomDating:(NSString *)roomUid {
|
- (void)openRoomDating:(NSString *)roomUid {
|
||||||
|
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeViewController.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2025/9/2.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MvpViewController.h"
|
||||||
|
|
||||||
|
@class RoomInfoModel;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turbo模式设置控制器
|
||||||
|
*/
|
||||||
|
@interface XPEffectPanelViewController : MvpViewController
|
||||||
|
|
||||||
|
@property (nonatomic, strong) RoomInfoModel *roomInfo;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,336 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeViewController.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by Linus on 2025/1/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPEffectPanelViewController.h"
|
||||||
|
#import "RoomInfoModel.h"
|
||||||
|
#import "XPTurboModeConstants.h"
|
||||||
|
#import "TurboModeStateManager.h"
|
||||||
|
|
||||||
|
@interface XPEffectPanelViewController () <UIGestureRecognizerDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIView *bottomAreaBackground;
|
||||||
|
@property (nonatomic, strong) UIButton *dismissButton;
|
||||||
|
@property (nonatomic, strong) UILabel *titleLabel;
|
||||||
|
|
||||||
|
// 三个开关
|
||||||
|
@property (nonatomic, strong) UISwitch *giftEffectsSwitch; // 礼物特效开关
|
||||||
|
@property (nonatomic, strong) UISwitch *globalGiftScreenSwitch; // 全局礼物屏幕开关
|
||||||
|
@property (nonatomic, strong) UISwitch *globalGameScreenSwitch; // 全局游戏屏幕开关
|
||||||
|
|
||||||
|
// 开关状态
|
||||||
|
@property (nonatomic, assign) BOOL giftEffectsEnabled; // 礼物特效开关状态(临时)
|
||||||
|
@property (nonatomic, assign) BOOL globalGiftScreenEnabled; // 全局礼物屏幕开关状态(持久化)
|
||||||
|
@property (nonatomic, assign) BOOL globalGameScreenEnabled; // 全局游戏屏幕开关状态(持久化)
|
||||||
|
|
||||||
|
// 房间信息
|
||||||
|
@property (nonatomic, strong) NSString *roomId; // 当前房间 ID
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XPEffectPanelViewController
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
[self setupUI];
|
||||||
|
[self setupSwitchStates];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupUI {
|
||||||
|
self.view.backgroundColor = [UIColor clearColor];
|
||||||
|
|
||||||
|
[self setupBottomArea];
|
||||||
|
[self setupDismissButton];
|
||||||
|
[self setupTitle];
|
||||||
|
[self setupSwitches];
|
||||||
|
[self setupTapGesture];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupBottomArea {
|
||||||
|
self.bottomAreaBackground = [[UIView alloc] init];
|
||||||
|
self.bottomAreaBackground.backgroundColor = [UIColor colorWithWhite:0.1 alpha:0.95];
|
||||||
|
self.bottomAreaBackground.layer.cornerRadius = 20;
|
||||||
|
self.bottomAreaBackground.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
|
||||||
|
[self.view addSubview:self.bottomAreaBackground];
|
||||||
|
|
||||||
|
// 设置约束 - 使用 Masonry
|
||||||
|
[self.bottomAreaBackground mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.leading.trailing.bottom.mas_equalTo(self.view);
|
||||||
|
make.height.mas_equalTo(300);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupDismissButton {
|
||||||
|
self.dismissButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
[self.dismissButton setTitle:@"✕" forState:UIControlStateNormal];
|
||||||
|
[self.dismissButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
self.dismissButton.titleLabel.font = [UIFont systemFontOfSize:24];
|
||||||
|
[self.dismissButton addTarget:self action:@selector(dismissViewController) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.bottomAreaBackground addSubview:self.dismissButton];
|
||||||
|
|
||||||
|
// 设置约束 - 使用 Masonry
|
||||||
|
[self.dismissButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.mas_equalTo(self.bottomAreaBackground).offset(20);
|
||||||
|
make.trailing.mas_equalTo(self.bottomAreaBackground).offset(-20);
|
||||||
|
make.width.height.mas_equalTo(44);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupTitle {
|
||||||
|
self.titleLabel = [[UILabel alloc] init];
|
||||||
|
self.titleLabel.text = YMLocalizedString(@"20.20.62_text_9"); // Turbo Mode
|
||||||
|
self.titleLabel.textColor = [UIColor whiteColor];
|
||||||
|
self.titleLabel.font = [UIFont boldSystemFontOfSize:18];
|
||||||
|
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
|
[self.bottomAreaBackground addSubview:self.titleLabel];
|
||||||
|
|
||||||
|
// 设置约束 - 使用 Masonry
|
||||||
|
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.centerY.mas_equalTo(self.dismissButton);
|
||||||
|
make.centerX.mas_equalTo(self.bottomAreaBackground);
|
||||||
|
make.leading.mas_greaterThanOrEqualTo(self.bottomAreaBackground).offset(60);
|
||||||
|
make.trailing.mas_lessThanOrEqualTo(self.bottomAreaBackground).offset(-60);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupSwitches {
|
||||||
|
// 礼物特效开关(临时状态)
|
||||||
|
[self setupSwitchItem:YMLocalizedString(@"20.20.62_text_10") // Gift effects
|
||||||
|
switch:self.giftEffectsSwitch
|
||||||
|
atIndex:0];
|
||||||
|
|
||||||
|
// 全局礼物屏幕开关(持久化)
|
||||||
|
[self setupSwitchItem:YMLocalizedString(@"20.20.62_text_11") // Global gift screen
|
||||||
|
switch:self.globalGiftScreenSwitch
|
||||||
|
atIndex:1];
|
||||||
|
|
||||||
|
// 全局游戏屏幕开关(持久化)
|
||||||
|
[self setupSwitchItem:YMLocalizedString(@"20.20.62_text_12") // Global game screen
|
||||||
|
switch:self.globalGameScreenSwitch
|
||||||
|
atIndex:2];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupSwitchItem:(NSString *)title
|
||||||
|
switch:(UISwitch *)switchControl
|
||||||
|
atIndex:(NSInteger)index {
|
||||||
|
|
||||||
|
UIView *switchView = [[UIView alloc] init];
|
||||||
|
switchView.backgroundColor = [UIColor colorWithWhite:0.2 alpha:0.8];
|
||||||
|
switchView.layer.cornerRadius = 12;
|
||||||
|
[self.bottomAreaBackground addSubview:switchView];
|
||||||
|
|
||||||
|
UILabel *titleLabel = [[UILabel alloc] init];
|
||||||
|
titleLabel.text = title;
|
||||||
|
titleLabel.textColor = [UIColor whiteColor];
|
||||||
|
titleLabel.font = [UIFont systemFontOfSize:16];
|
||||||
|
[switchView addSubview:titleLabel];
|
||||||
|
|
||||||
|
UISwitch *switchViewControl = [[UISwitch alloc] init];
|
||||||
|
switchViewControl.onTintColor = [UIColor systemBlueColor];
|
||||||
|
[switchView addSubview:switchViewControl];
|
||||||
|
|
||||||
|
// 设置约束 - 使用 Masonry
|
||||||
|
[switchView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.leading.mas_equalTo(self.bottomAreaBackground).offset(20);
|
||||||
|
make.trailing.mas_equalTo(self.bottomAreaBackground).offset(-20);
|
||||||
|
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(30 + index * 70);
|
||||||
|
make.height.mas_equalTo(50);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.leading.mas_equalTo(switchView).offset(16);
|
||||||
|
make.centerY.mas_equalTo(switchView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[switchViewControl mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.trailing.mas_equalTo(switchView).offset(-16);
|
||||||
|
make.centerY.mas_equalTo(switchView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
// 添加开关事件
|
||||||
|
[switchViewControl addTarget:self action:@selector(switchValueChanged:) forControlEvents:UIControlEventValueChanged];
|
||||||
|
switchViewControl.tag = index;
|
||||||
|
|
||||||
|
// 保存 switch 引用
|
||||||
|
if (index == 0) {
|
||||||
|
self.giftEffectsSwitch = switchViewControl;
|
||||||
|
} else if (index == 1) {
|
||||||
|
self.globalGiftScreenSwitch = switchViewControl;
|
||||||
|
} else if (index == 2) {
|
||||||
|
self.globalGameScreenSwitch = switchViewControl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupSwitchStates {
|
||||||
|
NSString *roomId = @(self.roomInfo.roomId).stringValue;
|
||||||
|
self.roomId = roomId;
|
||||||
|
|
||||||
|
// 检查 turbo mode 状态(全局)
|
||||||
|
BOOL turboModeEnabled = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||||
|
|
||||||
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
|
if (turboModeEnabled) {
|
||||||
|
// turbo mode = YES,3个开关全部关闭
|
||||||
|
self.giftEffectsEnabled = NO;
|
||||||
|
self.globalGiftScreenEnabled = NO;
|
||||||
|
self.globalGameScreenEnabled = NO;
|
||||||
|
// 保持所有开关可点击,不设置 enabled = NO
|
||||||
|
NSLog(@"🎮 Turbo Mode 已开启,所有开关显示关闭状态但可点击");
|
||||||
|
} else {
|
||||||
|
// turbo mode = NO,正常读取开关状态
|
||||||
|
// 礼物特效:直接使用房间默认状态,不需要检查持久化
|
||||||
|
self.giftEffectsEnabled = self.roomInfo.hasAnimationEffect;
|
||||||
|
|
||||||
|
// 其他两个开关:从房间特定的 NSUserDefaults 读取(区分未设置与显式 NO)
|
||||||
|
id giftScreenObj = [defaults objectForKey:kTurboGlobalGiftScreenEnabledKey(roomId)];
|
||||||
|
self.globalGiftScreenEnabled = (giftScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] : YES; // 默认开启
|
||||||
|
id gameScreenObj = [defaults objectForKey:kTurboGlobalGameScreenEnabledKey(roomId)];
|
||||||
|
self.globalGameScreenEnabled = (gameScreenObj != nil) ? [defaults boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] : YES; // 默认开启
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置开关初始状态
|
||||||
|
self.giftEffectsSwitch.on = self.giftEffectsEnabled;
|
||||||
|
self.globalGiftScreenSwitch.on = self.globalGiftScreenEnabled;
|
||||||
|
self.globalGameScreenSwitch.on = self.globalGameScreenEnabled;
|
||||||
|
|
||||||
|
NSLog(@"🎮 Turbo Mode开关初始化完成 - 房间ID: %@, 礼物特效: %@, 全局礼物屏幕: %@, 全局游戏屏幕: %@",
|
||||||
|
roomId,
|
||||||
|
self.giftEffectsEnabled ? @"开启" : @"关闭",
|
||||||
|
self.globalGiftScreenEnabled ? @"开启" : @"关闭",
|
||||||
|
self.globalGameScreenEnabled ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)switchValueChanged:(UISwitch *)sender {
|
||||||
|
BOOL isOn = sender.isOn;
|
||||||
|
|
||||||
|
// 检查当前 turbo mode 状态
|
||||||
|
BOOL currentTurboMode = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||||
|
|
||||||
|
if (currentTurboMode && isOn) {
|
||||||
|
// turbo mode 开启时,用户点击开启开关,自动关闭 turbo mode
|
||||||
|
[[TurboModeStateManager sharedManager] setTurboModeEnabled:NO];
|
||||||
|
|
||||||
|
// 更新本地状态为开启
|
||||||
|
if (sender.tag == 0) { // 礼物特效开关
|
||||||
|
self.giftEffectsEnabled = YES;
|
||||||
|
} else if (sender.tag == 1) { // 全局礼物屏幕
|
||||||
|
self.globalGiftScreenEnabled = YES;
|
||||||
|
} else if (sender.tag == 2) { // 全局游戏屏幕
|
||||||
|
self.globalGameScreenEnabled = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发送通知,让 RoomAnimationView 更新状态
|
||||||
|
[self sendSwitchStateChangeNotification:sender.tag enabled:YES];
|
||||||
|
|
||||||
|
NSLog(@"🎮 Turbo Mode 已自动关闭,开关 %ld 已开启", (long)sender.tag);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 正常处理开关状态变化
|
||||||
|
if (sender.tag == 0) { // 礼物特效开关
|
||||||
|
// 临时更改房间状态,不影响 roomInfo.hasAnimationEffect
|
||||||
|
self.giftEffectsEnabled = isOn;
|
||||||
|
// 发送通知,让 RoomAnimationView 临时应用
|
||||||
|
[self sendTurboGiftEffectsNotification:isOn];
|
||||||
|
|
||||||
|
} else if (sender.tag == 1) { // 全局礼物屏幕
|
||||||
|
self.globalGiftScreenEnabled = isOn;
|
||||||
|
// 按房间 ID 持久化
|
||||||
|
[[NSUserDefaults standardUserDefaults]
|
||||||
|
setBool:isOn forKey:kTurboGlobalGiftScreenEnabledKey(self.roomId)];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
[self sendTurboGlobalGiftScreenNotification:isOn];
|
||||||
|
|
||||||
|
} else if (sender.tag == 2) { // 全局游戏屏幕
|
||||||
|
self.globalGameScreenEnabled = isOn;
|
||||||
|
// 按房间 ID 持久化
|
||||||
|
[[NSUserDefaults standardUserDefaults]
|
||||||
|
setBool:isOn forKey:kTurboGlobalGameScreenEnabledKey(self.roomId)];
|
||||||
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
[self sendTurboGlobalGameScreenNotification:isOn];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通知父控制器更新 Turbo_Mode 按钮状态
|
||||||
|
[self notifyParentUpdateTurboModeButton];
|
||||||
|
|
||||||
|
NSLog(@"🎮 Turbo Mode开关变化 - 索引: %ld, 状态: %@", (long)sender.tag, isOn ? @"开启" : @"关闭");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sendSwitchStateChangeNotification:(NSInteger)switchTag enabled:(BOOL)enabled {
|
||||||
|
// 根据开关类型发送对应的通知
|
||||||
|
switch (switchTag) {
|
||||||
|
case 0: // 礼物特效开关
|
||||||
|
[self sendTurboGiftEffectsNotification:enabled];
|
||||||
|
break;
|
||||||
|
case 1: // 全局礼物屏幕开关
|
||||||
|
[self sendTurboGlobalGiftScreenNotification:enabled];
|
||||||
|
break;
|
||||||
|
case 2: // 全局游戏屏幕开关
|
||||||
|
[self sendTurboGlobalGameScreenNotification:enabled];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)notifyParentUpdateTurboModeButton {
|
||||||
|
BOOL allSwitchesOn = self.giftEffectsEnabled &&
|
||||||
|
self.globalGiftScreenEnabled &&
|
||||||
|
self.globalGameScreenEnabled;
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboModeButtonStateChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"allOn": @(allSwitchesOn)}];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Notification Methods
|
||||||
|
|
||||||
|
- (void)sendTurboGiftEffectsNotification:(BOOL)enabled {
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGiftEffectsEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"on": @(enabled)}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sendTurboGlobalGiftScreenNotification:(BOOL)enabled {
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGlobalGiftScreenEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"on": @(enabled)}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sendTurboGlobalGameScreenNotification:(BOOL)enabled {
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
postNotificationName:kTurboGlobalGameScreenEnabledChanged
|
||||||
|
object:nil
|
||||||
|
userInfo:@{@"on": @(enabled)}];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupTapGesture {
|
||||||
|
// 创建点击手势识别器,点击空白区域时关闭 VC
|
||||||
|
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleBackgroundTap:)];
|
||||||
|
tapGesture.delegate = self;
|
||||||
|
[self.view addGestureRecognizer:tapGesture];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)handleBackgroundTap:(UITapGestureRecognizer *)gesture {
|
||||||
|
// 获取点击位置
|
||||||
|
CGPoint location = [gesture locationInView:self.view];
|
||||||
|
|
||||||
|
// 检查点击位置是否在底部黑色背景区域外
|
||||||
|
if (!CGRectContainsPoint(self.bottomAreaBackground.frame, location)) {
|
||||||
|
// 点击在空白区域,关闭 VC
|
||||||
|
[self dismissViewController];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dismissViewController {
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
@@ -51,8 +51,16 @@
|
|||||||
#import "XPRoomMoreMenuAction.h"
|
#import "XPRoomMoreMenuAction.h"
|
||||||
#import "XPPKAction.h"
|
#import "XPPKAction.h"
|
||||||
|
|
||||||
|
#import "XPEffectPanelViewController.h"
|
||||||
|
#import "XPTurboModeConstants.h"
|
||||||
|
#import "XPRoomSettingPresenter.h"
|
||||||
|
#import "../Manager/TurboModeStateManager.h"
|
||||||
|
|
||||||
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo Mode 相关常量声明
|
||||||
|
extern NSString *const kTurboModeButtonStateChanged;
|
||||||
|
|
||||||
@interface XPRoomMoreMenuViewController ()<UICollectionViewDelegate, UICollectionViewDataSource,XPMoreMenuProtocol>
|
@interface XPRoomMoreMenuViewController ()<UICollectionViewDelegate, UICollectionViewDataSource,XPMoreMenuProtocol>
|
||||||
///顶部的View
|
///顶部的View
|
||||||
@property (nonatomic,strong) UIView * topView;
|
@property (nonatomic,strong) UIView * topView;
|
||||||
@@ -70,10 +78,100 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
@property (nonatomic,assign) id<RoomHostDelegate> hostDelegate;
|
@property (nonatomic,assign) id<RoomHostDelegate> hostDelegate;
|
||||||
|
|
||||||
@property(nonatomic, assign) BOOL isOnMic;
|
@property(nonatomic, assign) BOOL isOnMic;
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo_Mode 按钮
|
||||||
|
@property (nonatomic, strong) UIButton *turboModeButton;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XPRoomMoreMenuViewController
|
@implementation XPRoomMoreMenuViewController
|
||||||
|
|
||||||
|
// 🔧 新增:设置 Turbo_Mode 按钮
|
||||||
|
- (void)setupTurboModeButton {
|
||||||
|
self.turboModeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
[self.turboModeButton setTitle:YMLocalizedString(@"20.20.62_text_9") forState:UIControlStateNormal];
|
||||||
|
[self.turboModeButton setImage:[UIImage imageNamed:@"icon_turbo_mode"] forState:UIControlStateNormal];
|
||||||
|
[self.turboModeButton addTarget:self action:@selector(turboModeButtonTapped) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
// 设置按钮样式
|
||||||
|
self.turboModeButton.backgroundColor = [UIColor colorWithWhite:0.1 alpha:0.8];
|
||||||
|
self.turboModeButton.layer.cornerRadius = 8;
|
||||||
|
self.turboModeButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||||
|
|
||||||
|
[self.view addSubview:self.turboModeButton];
|
||||||
|
|
||||||
|
// 设置约束 - 使用 Masonry
|
||||||
|
[self.turboModeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.mas_equalTo(self.topView.mas_bottom).offset(20);
|
||||||
|
make.centerX.mas_equalTo(self.view);
|
||||||
|
make.width.mas_equalTo(120);
|
||||||
|
make.height.mas_equalTo(40);
|
||||||
|
}];
|
||||||
|
|
||||||
|
// 初始化按钮状态
|
||||||
|
[self updateTurboModeButtonStateOnRoomEnter];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:设置 Turbo Mode 通知监听
|
||||||
|
- (void)setupTurboModeNotifications {
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
addObserver:self
|
||||||
|
selector:@selector(handleTurboModeButtonStateChanged:)
|
||||||
|
name:kTurboModeButtonStateChanged
|
||||||
|
object:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:处理 Turbo Mode 按钮状态变化
|
||||||
|
- (void)handleTurboModeButtonStateChanged:(NSNotification *)notification {
|
||||||
|
BOOL allOn = [notification.userInfo[@"allOn"] boolValue];
|
||||||
|
[self updateTurboModeButtonState:allOn];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:更新 Turbo Mode 按钮状态
|
||||||
|
- (void)updateTurboModeButtonState:(BOOL)allOn {
|
||||||
|
if (allOn) {
|
||||||
|
[self.turboModeButton setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
|
||||||
|
self.turboModeButton.backgroundColor = [UIColor colorWithRed:0.2 green:0.8 blue:0.2 alpha:0.8];
|
||||||
|
} else {
|
||||||
|
[self.turboModeButton setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
|
||||||
|
self.turboModeButton.backgroundColor = [UIColor colorWithWhite:0.1 alpha:0.8];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo Mode 按钮点击事件
|
||||||
|
- (void)turboModeButtonTapped {
|
||||||
|
// 打开 Turbo 配置面板
|
||||||
|
[self dismissViewControllerAnimated:NO completion:nil];
|
||||||
|
XPEffectPanelViewController *vc = [[XPEffectPanelViewController alloc] init];
|
||||||
|
vc.roomInfo = self.roomInfo;
|
||||||
|
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||||
|
[self.hostDelegate.getCurrentNav presentViewController:vc
|
||||||
|
animated:YES
|
||||||
|
completion:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 新增:进入房间时更新按钮状态
|
||||||
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
|
[super viewWillAppear:animated];
|
||||||
|
[self updateTurboModeButtonStateOnRoomEnter];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateTurboModeButtonStateOnRoomEnter {
|
||||||
|
NSString *roomId = @(self.roomInfo.roomId).stringValue;
|
||||||
|
|
||||||
|
// 读取三个开关状态
|
||||||
|
BOOL giftEffectsEnabled = self.roomInfo.hasAnimationEffect;
|
||||||
|
BOOL globalGiftScreenEnabled = [[NSUserDefaults standardUserDefaults]
|
||||||
|
boolForKey:kTurboGlobalGiftScreenEnabledKey(roomId)] ?: YES;
|
||||||
|
BOOL globalGameScreenEnabled = [[NSUserDefaults standardUserDefaults]
|
||||||
|
boolForKey:kTurboGlobalGameScreenEnabledKey(roomId)] ?: YES;
|
||||||
|
|
||||||
|
BOOL allOn = giftEffectsEnabled && globalGiftScreenEnabled && globalGameScreenEnabled;
|
||||||
|
[self updateTurboModeButtonState:allOn];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate isUserOnMic:(BOOL)isOnMic {
|
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate isUserOnMic:(BOOL)isOnMic {
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
self.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
self.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||||
@@ -91,6 +189,8 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
[self initSubViews];
|
[self initSubViews];
|
||||||
|
// [self setupTurboModeButton];
|
||||||
|
[self setupTurboModeNotifications];
|
||||||
[self initSubViewConstraints];
|
[self initSubViewConstraints];
|
||||||
|
|
||||||
///自己是公会超管
|
///自己是公会超管
|
||||||
@@ -101,10 +201,6 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// [self.presenter getMoreMenuDataSource:self.roomInfo
|
|
||||||
// isSuperAdmin:meIsSuperAdmin
|
|
||||||
// isOnMic:self.isOnMic
|
|
||||||
// isAppSuperAdmin:[self.hostDelegate.getUserInfo platformRole]==1];
|
|
||||||
|
|
||||||
[self.presenter getMoreMenuDataSourceWithNewArchitecture:self.roomInfo
|
[self.presenter getMoreMenuDataSourceWithNewArchitecture:self.roomInfo
|
||||||
isSuperAdmin:meIsSuperAdmin
|
isSuperAdmin:meIsSuperAdmin
|
||||||
@@ -156,6 +252,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
|
|
||||||
self.datasource = list;
|
self.datasource = list;
|
||||||
[self.collectionView reloadData];
|
[self.collectionView reloadData];
|
||||||
|
|
||||||
CGFloat contentHeight= 24 + 36;
|
CGFloat contentHeight= 24 + 36;
|
||||||
CGFloat itemHeight = 50;
|
CGFloat itemHeight = 50;
|
||||||
int page = list.count % 5;
|
int page = list.count % 5;
|
||||||
@@ -166,7 +263,9 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
contentHeight += ((scale+1) *itemHeight + scale * 12);
|
contentHeight += ((scale+1) *itemHeight + scale * 12);
|
||||||
}
|
}
|
||||||
CAShapeLayer * layer = [CAShapeLayer layer];
|
CAShapeLayer * layer = [CAShapeLayer layer];
|
||||||
UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, contentHeight) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)];
|
UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, contentHeight)
|
||||||
|
byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight
|
||||||
|
cornerRadii:CGSizeMake(8, 8)];
|
||||||
layer.path = path.CGPath;
|
layer.path = path.CGPath;
|
||||||
self.collectionView.layer.mask = layer;
|
self.collectionView.layer.mask = layer;
|
||||||
[self.collectionView mas_updateConstraints:^(MASConstraintMaker *make) {
|
[self.collectionView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -253,9 +352,6 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
|
|
||||||
XPAnchorPKViewController * acrossRoomPKVC = [[XPAnchorPKViewController alloc] initWithRoomUid:roomUid];
|
XPAnchorPKViewController * acrossRoomPKVC = [[XPAnchorPKViewController alloc] initWithRoomUid:roomUid];
|
||||||
[self.hostDelegate.getCurrentNav presentViewController:acrossRoomPKVC animated:YES completion:nil];
|
[self.hostDelegate.getCurrentNav presentViewController:acrossRoomPKVC animated:YES completion:nil];
|
||||||
|
|
||||||
// XPAnchorPKSelectTypeController *selectVc = [[XPAnchorPKSelectTypeController alloc] initWithRoomUid:roomUid];
|
|
||||||
// [self.hostDelegate.getCurrentNav presentViewController:selectVc animated:YES completion:nil];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
||||||
@@ -282,20 +378,27 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
NSString * roomUid = [NSString stringWithFormat:@"%ld",self.roomInfo.uid];
|
NSString * roomUid = [NSString stringWithFormat:@"%ld",self.roomInfo.uid];
|
||||||
|
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case RoomMoreMenuType_Gift_Effect_Open:
|
case Room_Turbo_Mode_Open:
|
||||||
|
case Room_Turbo_Mode_Close:
|
||||||
{
|
{
|
||||||
[self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController4")];
|
|
||||||
NSDictionary * dic = @{@"hasAnimationEffect": @(1)};
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
|
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case RoomMoreMenuType_Gift_Effect_Close:
|
|
||||||
{
|
|
||||||
[self showSuccessToast:YMLocalizedString(@"XPRoomMoreMenuViewController5")];
|
|
||||||
NSDictionary * dic = @{@"hasAnimationEffect": @(0)};
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
|
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
// 获取当前房间的 turbo mode 状态
|
||||||
|
NSString *roomId = @(self.roomInfo.roomId).stringValue;
|
||||||
|
BOOL currentTurboMode = [[TurboModeStateManager sharedManager] isTurboModeEnabled];
|
||||||
|
BOOL newTurboMode = !currentTurboMode;
|
||||||
|
|
||||||
|
// 设置新的 turbo mode 状态(全局)
|
||||||
|
[[TurboModeStateManager sharedManager] setTurboModeEnabled:newTurboMode];
|
||||||
|
|
||||||
|
// 应用 turbo mode 到3个开关
|
||||||
|
[[TurboModeStateManager sharedManager] applyTurboModeToSwitchesForRoom:roomId];
|
||||||
|
|
||||||
|
// 显示提示
|
||||||
|
if (newTurboMode) {
|
||||||
|
[self showSuccessToast:YMLocalizedString(@"Turbo Mode 已开启")];
|
||||||
|
} else {
|
||||||
|
[self showSuccessToast:YMLocalizedString(@"Turbo Mode 已关闭")];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RoomMoreMenuType_Invite_Fans:
|
case RoomMoreMenuType_Invite_Fans:
|
||||||
@@ -534,6 +637,16 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
[self.hostDelegate.getCurrentNav pushViewController:vc animated:YES];
|
[self.hostDelegate.getCurrentNav pushViewController:vc animated:YES];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case RoomMoreMenuType_MyAnimationEffects_Mode: {
|
||||||
|
[self dismissViewControllerAnimated:NO completion:nil];
|
||||||
|
XPEffectPanelViewController *vc = [[XPEffectPanelViewController alloc] init];
|
||||||
|
vc.roomInfo = self.roomInfo;
|
||||||
|
vc.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||||
|
[self.hostDelegate.getCurrentNav presentViewController:vc
|
||||||
|
animated:YES
|
||||||
|
completion:nil];
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -569,7 +682,6 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
_topView.backgroundColor = [UIColor clearColor];
|
_topView.backgroundColor = [UIColor clearColor];
|
||||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(disMissRecognizer)];
|
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(disMissRecognizer)];
|
||||||
tap.cancelsTouchesInView = NO;
|
tap.cancelsTouchesInView = NO;
|
||||||
tap.delegate = self;
|
|
||||||
[_topView addGestureRecognizer:tap];
|
[_topView addGestureRecognizer:tap];
|
||||||
}
|
}
|
||||||
return _topView;
|
return _topView;
|
||||||
|
29
YuMi/Modules/YMRoom/View/MoreView/View/XPTurboModeTipsView.h
Normal file
29
YuMi/Modules/YMRoom/View/MoreView/View/XPTurboModeTipsView.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeTipsView.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by AI Assistant
|
||||||
|
// Copyright © 2024 YuMi. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@protocol XPTurboModeTipsViewDelegate <NSObject>
|
||||||
|
|
||||||
|
@optional
|
||||||
|
- (void)turboModeTipsViewDidTapUnderstand;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface XPTurboModeTipsView : UIView
|
||||||
|
|
||||||
|
@property (nonatomic, weak) id<XPTurboModeTipsViewDelegate> delegate;
|
||||||
|
|
||||||
|
+ (instancetype)showInView:(UIView *)parentView;
|
||||||
|
- (void)dismiss;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
193
YuMi/Modules/YMRoom/View/MoreView/View/XPTurboModeTipsView.m
Normal file
193
YuMi/Modules/YMRoom/View/MoreView/View/XPTurboModeTipsView.m
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeTipsView.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by AI Assistant
|
||||||
|
// Copyright © 2024 YuMi. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPTurboModeTipsView.h"
|
||||||
|
|
||||||
|
@interface XPTurboModeTipsView ()
|
||||||
|
|
||||||
|
@property (nonatomic, strong) UIView *backgroundView;
|
||||||
|
@property (nonatomic, strong) UIView *contentView;
|
||||||
|
@property (nonatomic, strong) UILabel *titleLabel;
|
||||||
|
@property (nonatomic, strong) UILabel *contentLabel;
|
||||||
|
@property (nonatomic, strong) UIButton *understandButton;
|
||||||
|
@property (nonatomic, strong) UIView *parentView;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation XPTurboModeTipsView
|
||||||
|
|
||||||
|
#pragma mark - Public Methods
|
||||||
|
|
||||||
|
+ (instancetype)showInView:(UIView *)parentView {
|
||||||
|
XPTurboModeTipsView *tipsView = [[XPTurboModeTipsView alloc] init];
|
||||||
|
tipsView.parentView = parentView;
|
||||||
|
[tipsView setupUI];
|
||||||
|
[tipsView showWithAnimation];
|
||||||
|
return tipsView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dismiss {
|
||||||
|
[self dismissWithAnimation];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Private Methods
|
||||||
|
|
||||||
|
- (void)setupUI {
|
||||||
|
// 设置自身属性
|
||||||
|
self.frame = self.parentView.bounds;
|
||||||
|
self.backgroundColor = [UIColor clearColor];
|
||||||
|
|
||||||
|
// 添加背景遮罩
|
||||||
|
[self setupBackgroundView];
|
||||||
|
|
||||||
|
// 添加内容视图
|
||||||
|
[self setupContentView];
|
||||||
|
|
||||||
|
// 添加标题
|
||||||
|
[self setupTitleLabel];
|
||||||
|
|
||||||
|
// 添加内容文字
|
||||||
|
[self setupContentLabel];
|
||||||
|
|
||||||
|
// 添加按钮
|
||||||
|
[self setupUnderstandButton];
|
||||||
|
|
||||||
|
// 设置约束
|
||||||
|
[self setupConstraints];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupBackgroundView {
|
||||||
|
self.backgroundView = [[UIView alloc] init];
|
||||||
|
self.backgroundView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||||
|
[self addSubview:self.backgroundView];
|
||||||
|
|
||||||
|
// 添加点击手势
|
||||||
|
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backgroundTapped)];
|
||||||
|
[self.backgroundView addGestureRecognizer:tapGesture];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupContentView {
|
||||||
|
self.contentView = [[UIView alloc] init];
|
||||||
|
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||||
|
self.contentView.layer.cornerRadius = 16.0;
|
||||||
|
self.contentView.layer.shadowColor = [UIColor blackColor].CGColor;
|
||||||
|
self.contentView.layer.shadowOffset = CGSizeMake(0, 4);
|
||||||
|
self.contentView.layer.shadowOpacity = 0.15;
|
||||||
|
self.contentView.layer.shadowRadius = 8.0;
|
||||||
|
[self addSubview:self.contentView];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupTitleLabel {
|
||||||
|
self.titleLabel = [[UILabel alloc] init];
|
||||||
|
self.titleLabel.text = @"Tips";
|
||||||
|
self.titleLabel.font = [UIFont boldSystemFontOfSize:20.0];
|
||||||
|
self.titleLabel.textColor = [UIColor blackColor];
|
||||||
|
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
|
[self.contentView addSubview:self.titleLabel];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupContentLabel {
|
||||||
|
self.contentLabel = [[UILabel alloc] init];
|
||||||
|
self.contentLabel.text = @"Enabling Turbo mode can make the app run smoother.\n\nTurbo mode: Turns off room gift animations, in-room broadcasts, CP displays, and other animated effects.\n\nTo make the app run smoother, it has automatically switched to Turbo mode for you (Turbo mode: Automatically turns off gift animations, headwear effects, and merges gift messages in the public chat). You can turn off this mode in the room settings.";
|
||||||
|
self.contentLabel.font = [UIFont systemFontOfSize:16.0];
|
||||||
|
self.contentLabel.textColor = [UIColor darkGrayColor];
|
||||||
|
self.contentLabel.numberOfLines = 0;
|
||||||
|
self.contentLabel.textAlignment = NSTextAlignmentLeft;
|
||||||
|
[self.contentView addSubview:self.contentLabel];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupUnderstandButton {
|
||||||
|
self.understandButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
[self.understandButton setTitle:@"I understand" forState:UIControlStateNormal];
|
||||||
|
[self.understandButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
self.understandButton.titleLabel.font = [UIFont boldSystemFontOfSize:18.0];
|
||||||
|
self.understandButton.backgroundColor = [UIColor colorWithRed:1.0 green:0.5 blue:0.0 alpha:1.0]; // 橙色
|
||||||
|
self.understandButton.layer.cornerRadius = 22.0;
|
||||||
|
[self.understandButton addTarget:self action:@selector(understandButtonTapped) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
[self.contentView addSubview:self.understandButton];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupConstraints {
|
||||||
|
[self.backgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.equalTo(self);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.center.equalTo(self);
|
||||||
|
make.width.equalTo(@320);
|
||||||
|
make.height.lessThanOrEqualTo(@500);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.contentView).offset(24);
|
||||||
|
make.left.right.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 24, 0, 24));
|
||||||
|
make.height.equalTo(@30);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.titleLabel.mas_bottom).offset(16);
|
||||||
|
make.left.right.equalTo(self.contentView).insets(UIEdgeInsetsMake(0, 24, 0, 24));
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.understandButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.contentLabel.mas_bottom).offset(24);
|
||||||
|
make.centerX.equalTo(self.contentView);
|
||||||
|
make.width.equalTo(@200);
|
||||||
|
make.height.equalTo(@44);
|
||||||
|
make.bottom.equalTo(self.contentView).offset(-24);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Actions
|
||||||
|
|
||||||
|
- (void)backgroundTapped {
|
||||||
|
// 点击背景不关闭弹窗,保持用户体验
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)understandButtonTapped {
|
||||||
|
NSLog(@"🎮 用户点击了 'I understand' 按钮");
|
||||||
|
|
||||||
|
if (self.delegate && [self.delegate respondsToSelector:@selector(turboModeTipsViewDidTapUnderstand)]) {
|
||||||
|
[self.delegate turboModeTipsViewDidTapUnderstand];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self dismiss];
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma mark - Animation
|
||||||
|
|
||||||
|
- (void)showWithAnimation {
|
||||||
|
[self.parentView addSubview:self];
|
||||||
|
|
||||||
|
// 初始状态
|
||||||
|
self.backgroundView.alpha = 0;
|
||||||
|
self.contentView.transform = CGAffineTransformMakeScale(0.8, 0.8);
|
||||||
|
self.contentView.alpha = 0;
|
||||||
|
|
||||||
|
// 动画显示
|
||||||
|
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0.6 options:UIViewAnimationOptionCurveEaseOut animations:^{
|
||||||
|
self.backgroundView.alpha = 1;
|
||||||
|
self.contentView.transform = CGAffineTransformIdentity;
|
||||||
|
self.contentView.alpha = 1;
|
||||||
|
} completion:nil];
|
||||||
|
|
||||||
|
NSLog(@"🎮 Tips 弹窗已添加到父视图,动画开始");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dismissWithAnimation {
|
||||||
|
[UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
|
||||||
|
self.backgroundView.alpha = 0;
|
||||||
|
self.contentView.transform = CGAffineTransformMakeScale(0.8, 0.8);
|
||||||
|
self.contentView.alpha = 0;
|
||||||
|
} completion:^(BOOL finished) {
|
||||||
|
[self removeFromSuperview];
|
||||||
|
NSLog(@"🎮 Tips 弹窗已从父视图移除");
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
55
YuMi/Modules/YMRoom/View/MoreView/XPTurboModeConstants.h
Normal file
55
YuMi/Modules/YMRoom/View/MoreView/XPTurboModeConstants.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeConstants.h
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2025/1/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
// MARK: - 缓存 Key 生成函数
|
||||||
|
/**
|
||||||
|
* 生成礼物特效开关的缓存 Key
|
||||||
|
* @param roomId 房间 ID
|
||||||
|
* @return 格式化的缓存 Key
|
||||||
|
*/
|
||||||
|
NSString *kTurboGiftEffectsEnabledKey(NSString *roomId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成全局礼物屏幕开关的缓存 Key
|
||||||
|
* @param roomId 房间 ID
|
||||||
|
* @return 格式化的缓存 Key
|
||||||
|
*/
|
||||||
|
NSString *kTurboGlobalGiftScreenEnabledKey(NSString *roomId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成全局游戏屏幕开关的缓存 Key
|
||||||
|
* @param roomId 房间 ID
|
||||||
|
* @return 格式化的缓存 Key
|
||||||
|
*/
|
||||||
|
NSString *kTurboGlobalGameScreenEnabledKey(NSString *roomId);
|
||||||
|
|
||||||
|
// MARK: - 通知名称常量
|
||||||
|
/**
|
||||||
|
* 礼物特效开关状态改变通知
|
||||||
|
*/
|
||||||
|
extern NSString *const kTurboGiftEffectsEnabledChanged;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全局礼物屏幕开关状态改变通知
|
||||||
|
*/
|
||||||
|
extern NSString *const kTurboGlobalGiftScreenEnabledChanged;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全局游戏屏幕开关状态改变通知
|
||||||
|
*/
|
||||||
|
extern NSString *const kTurboGlobalGameScreenEnabledChanged;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turbo Mode 按钮状态改变通知
|
||||||
|
*/
|
||||||
|
extern NSString *const kTurboModeButtonStateChanged;
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
27
YuMi/Modules/YMRoom/View/MoreView/XPTurboModeConstants.m
Normal file
27
YuMi/Modules/YMRoom/View/MoreView/XPTurboModeConstants.m
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
//
|
||||||
|
// XPTurboModeConstants.m
|
||||||
|
// YuMi
|
||||||
|
//
|
||||||
|
// Created by P on 2025/1/13.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "XPTurboModeConstants.h"
|
||||||
|
|
||||||
|
// MARK: - 缓存 Key 生成函数实现
|
||||||
|
NSString *kTurboGiftEffectsEnabledKey(NSString *roomId) {
|
||||||
|
return [NSString stringWithFormat:@"TurboGiftEffects_%@", roomId];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *kTurboGlobalGiftScreenEnabledKey(NSString *roomId) {
|
||||||
|
return [NSString stringWithFormat:@"TurboGlobalGiftScreen_%@", roomId];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSString *kTurboGlobalGameScreenEnabledKey(NSString *roomId) {
|
||||||
|
return [NSString stringWithFormat:@"TurboGlobalGameScreen_%@", roomId];
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - 通知名称常量定义
|
||||||
|
NSString *const kTurboGiftEffectsEnabledChanged = @"kTurboGiftEffectsEnabledChanged";
|
||||||
|
NSString *const kTurboGlobalGiftScreenEnabledChanged = @"kTurboGlobalGiftScreenEnabledChanged";
|
||||||
|
NSString *const kTurboGlobalGameScreenEnabledChanged = @"kTurboGlobalGameScreenEnabledChanged";
|
||||||
|
NSString *const kTurboModeButtonStateChanged = @"kTurboModeButtonStateChanged";
|
@@ -100,64 +100,21 @@
|
|||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
giftIdMapCache = [[NSCache alloc] init];
|
giftIdMapCache = [[NSCache alloc] init];
|
||||||
giftIdMapCache.countLimit = 50;
|
giftIdMapCache.countLimit = 100; // 设置合理的缓存限制
|
||||||
});
|
});
|
||||||
|
|
||||||
NSDictionary<NSNumber *, GiftInfoModel *> *giftMap = [giftIdMapCache objectForKey:roomUid];
|
__block NSDictionary<NSNumber *, GiftInfoModel *> *giftMap = [giftIdMapCache objectForKey:roomUid];
|
||||||
if (!giftMap) {
|
if (!giftMap) {
|
||||||
|
// 构建映射表
|
||||||
NSMutableDictionary *map = [NSMutableDictionary new];
|
NSMutableDictionary *map = [NSMutableDictionary new];
|
||||||
for (GiftInfoModel *gift in giftLists) {
|
for (GiftInfoModel *gift in giftLists) {
|
||||||
map[@(gift.giftId)] = gift;
|
map[@(gift.giftId)] = gift;
|
||||||
}
|
}
|
||||||
giftMap = [map copy];
|
NSDictionary *newGiftMap = [map copy];
|
||||||
[giftIdMapCache setObject:giftMap forKey:roomUid];
|
[giftIdMapCache setObject:newGiftMap forKey:roomUid];
|
||||||
|
giftMap = newGiftMap;
|
||||||
}
|
}
|
||||||
return giftMap[@(giftIdInt)];
|
return giftMap[@(giftIdInt)];
|
||||||
|
|
||||||
|
|
||||||
// NSInteger giftIdInt = giftId.integerValue;
|
|
||||||
// NSArray<GiftInfoModel *> *giftLists = [self getRoomGiftDatasource:self.currentRoomUid];
|
|
||||||
// if (giftLists.count == 0) return nil;
|
|
||||||
//
|
|
||||||
// // 确保 giftLists 按 giftId 递增排序
|
|
||||||
// NSArray<GiftInfoModel *> *sortedGiftLists = [giftLists sortedArrayUsingComparator:^NSComparisonResult(GiftInfoModel *obj1, GiftInfoModel *obj2) {
|
|
||||||
// return [@(obj1.giftId) compare:@(obj2.giftId)];
|
|
||||||
// }];
|
|
||||||
//
|
|
||||||
// NSInteger left = 0, right = sortedGiftLists.count - 1;
|
|
||||||
// while (left <= right) {
|
|
||||||
// NSInteger mid = left + (right - left) / 2;
|
|
||||||
// if (sortedGiftLists[mid].giftId == giftIdInt) return sortedGiftLists[mid];
|
|
||||||
// if (sortedGiftLists[mid].giftId < giftIdInt) left = mid + 1;
|
|
||||||
// else right = mid - 1;
|
|
||||||
// }
|
|
||||||
// return nil;
|
|
||||||
|
|
||||||
// if (self.currentRoomUid) {
|
|
||||||
// NSArray<GiftInfoModel *> *giftLists = [self.roomGiftCache objectForKey:self.currentRoomUid];
|
|
||||||
// if (giftLists.count == 0) {
|
|
||||||
// giftLists = [self.roomGiftCache objectForKey:[self defaultKey]];
|
|
||||||
// }
|
|
||||||
// if (giftLists.count > 0) {
|
|
||||||
// NSInteger left = 0;
|
|
||||||
// NSInteger right = giftLists.count - 1;
|
|
||||||
//
|
|
||||||
// while (left <= right) {
|
|
||||||
// NSInteger mid = left + (right - left) / 2;
|
|
||||||
// GiftInfoModel *midObject = giftLists[mid];
|
|
||||||
//
|
|
||||||
// if (midObject.giftId == giftIdInt) {
|
|
||||||
// return midObject;
|
|
||||||
// } else if (midObject.giftId < giftIdInt) {
|
|
||||||
// left = mid + 1;
|
|
||||||
// } else {
|
|
||||||
// right = mid - 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return nil; // 如果没有找到匹配的对象,返回 nil
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return nil;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -94,6 +94,9 @@
|
|||||||
#import "RoomResourceManager.h"
|
#import "RoomResourceManager.h"
|
||||||
#import "LuckyPackageLogicManager.h"
|
#import "LuckyPackageLogicManager.h"
|
||||||
|
|
||||||
|
// 🔧 新增:Turbo Mode Tips 相关
|
||||||
|
#import "XPTurboModeTipsManager.h"
|
||||||
|
|
||||||
//#import "XPMineHallAnchorIncomeStatisViewController.h"
|
//#import "XPMineHallAnchorIncomeStatisViewController.h"
|
||||||
|
|
||||||
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||||
@@ -378,6 +381,9 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
|||||||
[self handleGiftComboCallBack];
|
[self handleGiftComboCallBack];
|
||||||
|
|
||||||
[self setupStageViewManager];
|
[self setupStageViewManager];
|
||||||
|
|
||||||
|
// 🔧 新增:启动 Turbo Mode Tips 监听
|
||||||
|
[[XPTurboModeTipsManager sharedManager] startTipsMonitoringInRoom];
|
||||||
}
|
}
|
||||||
|
|
||||||
//- (void)test {
|
//- (void)test {
|
||||||
@@ -613,6 +619,9 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
|||||||
[self.view addSubview:self.roomHeaderView];
|
[self.view addSubview:self.roomHeaderView];
|
||||||
[self.view addSubview:self.functionView];
|
[self.view addSubview:self.functionView];
|
||||||
[self.view addSubview:self.animationView];
|
[self.view addSubview:self.animationView];
|
||||||
|
|
||||||
|
// 🔧 新增:添加测试按钮,用于测试 Turbo Mode Tips 弹窗
|
||||||
|
[self addTestButton];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)__layoutTwentyMicStage {
|
- (void)__layoutTwentyMicStage {
|
||||||
@@ -3351,4 +3360,44 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
|||||||
NSLog(@" - stageView.class: %@", NSStringFromClass([self.stageView class]));
|
NSLog(@" - stageView.class: %@", NSStringFromClass([self.stageView class]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - 测试按钮相关
|
||||||
|
|
||||||
|
- (void)addTestButton {
|
||||||
|
// 创建简单的测试按钮
|
||||||
|
UIButton *testButton = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||||
|
[testButton setTitle:@"🧪 Test Tips" forState:UIControlStateNormal];
|
||||||
|
[testButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
testButton.backgroundColor = [UIColor colorWithRed:0.2 green:0.6 blue:0.8 alpha:0.9];
|
||||||
|
testButton.layer.cornerRadius = 15.0;
|
||||||
|
testButton.layer.borderWidth = 1.0;
|
||||||
|
testButton.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||||
|
|
||||||
|
// 添加点击事件
|
||||||
|
[testButton addTarget:self action:@selector(testButtonTapped) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
// 添加到视图
|
||||||
|
[self.view addSubview:testButton];
|
||||||
|
|
||||||
|
// 设置约束 - 放在右上角,不遮挡其他重要内容
|
||||||
|
[testButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.view).offset(100); // 在房间头部下方
|
||||||
|
make.trailing.equalTo(self.view).offset(-20);
|
||||||
|
make.width.equalTo(@120);
|
||||||
|
make.height.equalTo(@35);
|
||||||
|
}];
|
||||||
|
|
||||||
|
NSLog(@"🎮 测试按钮已添加到房间界面 - 位置:右上角,距离顶部100,距离右边20");
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)testButtonTapped {
|
||||||
|
NSLog(@"🎮 测试按钮被点击,准备显示 Turbo Mode Tips 弹窗");
|
||||||
|
NSLog(@"🎮 当前时间:%@", [NSDate date]);
|
||||||
|
NSLog(@"🎮 房间状态:%@", self.roomInfo ? @"已进入" : @"未进入");
|
||||||
|
|
||||||
|
// 调用 Tips Manager 显示弹窗
|
||||||
|
[[XPTurboModeTipsManager sharedManager] showTipsManually];
|
||||||
|
|
||||||
|
NSLog(@"🎮 Tips 弹窗显示请求已发送");
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -94,7 +94,7 @@
|
|||||||
editParam = [MSParamsDecode msDecodeParams:editParam];
|
editParam = [MSParamsDecode msDecodeParams:editParam];
|
||||||
params = [self configBaseParmars:editParam];
|
params = [self configBaseParmars:editParam];
|
||||||
|
|
||||||
#if 0
|
#if DEBUG
|
||||||
// 构建完整的 URL
|
// 构建完整的 URL
|
||||||
NSString *baseUrl = [HttpRequestHelper getHostUrl];
|
NSString *baseUrl = [HttpRequestHelper getHostUrl];
|
||||||
NSString *fullUrl = [NSString stringWithFormat:@"%@/%@", baseUrl, method];
|
NSString *fullUrl = [NSString stringWithFormat:@"%@/%@", baseUrl, method];
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
@kWeakify(self);
|
@kWeakify(self);
|
||||||
[manager GET:method parameters:params headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
[manager GET:method parameters:params headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||||
BaseModel *baseModel = [BaseModel modelWithDictionary:responseObject];
|
BaseModel *baseModel = [BaseModel modelWithDictionary:responseObject];
|
||||||
#if 0
|
#if DEBUG
|
||||||
NSLog(@"%@ - \n%@\n", method, [baseModel toJSONString]);
|
NSLog(@"%@ - \n%@\n", method, [baseModel toJSONString]);
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
@@ -338,7 +338,7 @@ constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
|||||||
params = [MSParamsDecode msDecodeParams:[params mutableCopy] ];
|
params = [MSParamsDecode msDecodeParams:[params mutableCopy] ];
|
||||||
params = [self configBaseParmars:params];
|
params = [self configBaseParmars:params];
|
||||||
AFHTTPSessionManager *manager = [HttpRequestHelper requestManager];
|
AFHTTPSessionManager *manager = [HttpRequestHelper requestManager];
|
||||||
#if 0
|
#if DEBUG
|
||||||
// 构建完整的 URL
|
// 构建完整的 URL
|
||||||
NSString *baseUrl = [HttpRequestHelper getHostUrl];
|
NSString *baseUrl = [HttpRequestHelper getHostUrl];
|
||||||
NSString *fullUrl = [NSString stringWithFormat:@"%@/%@", baseUrl, method];
|
NSString *fullUrl = [NSString stringWithFormat:@"%@/%@", baseUrl, method];
|
||||||
@@ -363,7 +363,7 @@ constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
|||||||
@kWeakify(self);
|
@kWeakify(self);
|
||||||
[manager DELETE:method parameters:params headers:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
[manager DELETE:method parameters:params headers:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||||
BaseModel *baseModel = [BaseModel modelWithDictionary:responseObject];
|
BaseModel *baseModel = [BaseModel modelWithDictionary:responseObject];
|
||||||
#if 0
|
#if DEBUG
|
||||||
NSLog(@"\n%@\n", [baseModel toJSONString]);
|
NSLog(@"\n%@\n", [baseModel toJSONString]);
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
@@ -4235,3 +4235,12 @@ ineHeadView12" = "الحمل";
|
|||||||
"20.20.62_text_6" = "الميكروفون مشغول. يُرجى المحاولة لاحقًا.";
|
"20.20.62_text_6" = "الميكروفون مشغول. يُرجى المحاولة لاحقًا.";
|
||||||
"20.20.62_text_7" = "ليس لديك إذن لدعوة المستخدم إلى الميكروفون.";
|
"20.20.62_text_7" = "ليس لديك إذن لدعوة المستخدم إلى الميكروفون.";
|
||||||
"20.20.62_text_8" = "فشل إرسال الدعوة. يُرجى التحقق من الشبكة.";
|
"20.20.62_text_8" = "فشل إرسال الدعوة. يُرجى التحقق من الشبكة.";
|
||||||
|
|
||||||
|
"20.20.62_text_9" = "Turn effects on/off";
|
||||||
|
"20.20.62_text_9.1" = "Turn effects on";
|
||||||
|
"20.20.62_text_9.2" = "Turn effects off";
|
||||||
|
"20.20.62_text_10" = "Gift effects";
|
||||||
|
"20.20.62_text_11" = "Global gift screen";
|
||||||
|
"20.20.62_text_12" = "Global game screen";
|
||||||
|
"20.20.62_text_13" = "Turbo mode";
|
||||||
|
"20.20.62_text_14" = "我的特效";
|
||||||
|
@@ -4022,3 +4022,12 @@
|
|||||||
"20.20.62_text_6" = "The mic is occupied. Please try again later.";
|
"20.20.62_text_6" = "The mic is occupied. Please try again later.";
|
||||||
"20.20.62_text_7" = "You do not have permission to invite the user to the mic.";
|
"20.20.62_text_7" = "You do not have permission to invite the user to the mic.";
|
||||||
"20.20.62_text_8" = "The invitation failed to be sent. Please check the network.";
|
"20.20.62_text_8" = "The invitation failed to be sent. Please check the network.";
|
||||||
|
|
||||||
|
"20.20.62_text_9" = "Turn effects on/off";
|
||||||
|
"20.20.62_text_9.1" = "Turn effects on";
|
||||||
|
"20.20.62_text_9.2" = "Turn effects off";
|
||||||
|
"20.20.62_text_10" = "Gift effects";
|
||||||
|
"20.20.62_text_11" = "Global gift screen";
|
||||||
|
"20.20.62_text_12" = "Global game screen";
|
||||||
|
"20.20.62_text_13" = "Turbo mode";
|
||||||
|
"20.20.62_text_14" = "我的特效";
|
||||||
|
@@ -3315,3 +3315,12 @@
|
|||||||
"20.20.62_text_6" = "O microfone está ocupado. Tente novamente mais tarde.";
|
"20.20.62_text_6" = "O microfone está ocupado. Tente novamente mais tarde.";
|
||||||
"20.20.62_text_7" = "Você não tem permissão para convidar o usuário para o microfone.";
|
"20.20.62_text_7" = "Você não tem permissão para convidar o usuário para o microfone.";
|
||||||
"20.20.62_text_8" = "O convite não foi enviado. Verifique a rede.";
|
"20.20.62_text_8" = "O convite não foi enviado. Verifique a rede.";
|
||||||
|
|
||||||
|
"20.20.62_text_9" = "Turn effects on/off";
|
||||||
|
"20.20.62_text_9.1" = "Turn effects on";
|
||||||
|
"20.20.62_text_9.2" = "Turn effects off";
|
||||||
|
"20.20.62_text_10" = "Gift effects";
|
||||||
|
"20.20.62_text_11" = "Global gift screen";
|
||||||
|
"20.20.62_text_12" = "Global game screen";
|
||||||
|
"20.20.62_text_13" = "Turbo mode";
|
||||||
|
"20.20.62_text_14" = "我的特效";
|
||||||
|
@@ -3816,3 +3816,12 @@
|
|||||||
"20.20.62_text_6" = "Mikrofon meşgul. Lütfen daha sonra tekrar deneyin.";
|
"20.20.62_text_6" = "Mikrofon meşgul. Lütfen daha sonra tekrar deneyin.";
|
||||||
"20.20.62_text_7" = "Kullanıcıyı mikrofona davet etme izniniz yok.";
|
"20.20.62_text_7" = "Kullanıcıyı mikrofona davet etme izniniz yok.";
|
||||||
"20.20.62_text_8" = "Davet gönderilemedi. Lütfen ağı kontrol edin.";
|
"20.20.62_text_8" = "Davet gönderilemedi. Lütfen ağı kontrol edin.";
|
||||||
|
|
||||||
|
"20.20.62_text_9" = "Turn effects on/off";
|
||||||
|
"20.20.62_text_9.1" = "Turn effects on";
|
||||||
|
"20.20.62_text_9.2" = "Turn effects off";
|
||||||
|
"20.20.62_text_10" = "Gift effects";
|
||||||
|
"20.20.62_text_11" = "Global gift screen";
|
||||||
|
"20.20.62_text_12" = "Global game screen";
|
||||||
|
"20.20.62_text_13" = "Turbo mode";
|
||||||
|
"20.20.62_text_14" = "我的特效";
|
||||||
|
@@ -3686,3 +3686,13 @@
|
|||||||
"20.20.62_text_6" = "麥克風已被佔用,請稍後再試。";
|
"20.20.62_text_6" = "麥克風已被佔用,請稍後再試。";
|
||||||
"20.20.62_text_7" = "您無權邀請該使用者加入麥克風。";
|
"20.20.62_text_7" = "您無權邀請該使用者加入麥克風。";
|
||||||
"20.20.62_text_8" = "邀請發送失敗,請檢查網路。";
|
"20.20.62_text_8" = "邀請發送失敗,請檢查網路。";
|
||||||
|
|
||||||
|
"20.20.62_text_9" = "Turn effects on/off";
|
||||||
|
"20.20.62_text_9.1" = "Turbo mode on";
|
||||||
|
"20.20.62_text_9.2" = "Turbo mode off";
|
||||||
|
"20.20.62_text_10" = "Gift effects";
|
||||||
|
"20.20.62_text_11" = "Global gift screen";
|
||||||
|
"20.20.62_text_12" = "Global game screen";
|
||||||
|
"20.20.62_text_13" = "Turbo mode";
|
||||||
|
"20.20.62_text_14" = "我的特效";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user