修复bug

This commit is contained in:
liyuhua
2023-09-20 14:01:55 +08:00
parent d87ac12794
commit 665df1a770
5 changed files with 12 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ target 'xplan-ios' do
#文字自动滚动 #文字自动滚动
pod 'MarqueeLabel-ObjC' pod 'MarqueeLabel-ObjC'
#声网 #声网
pod 'AgoraRtcEngine_iOS', '~> 3.0.1' pod 'AgoraRtcEngine_iOS', '~> 4.2.2'
#TRTC #TRTC
pod 'TXLiteAVSDK_TRTC', '~> 10.3.12271' pod 'TXLiteAVSDK_TRTC', '~> 10.3.12271'
#pop动画 #pop动画

View File

@@ -395,6 +395,9 @@
GiftSendType sendType = GiftSendType_OnMic; GiftSendType sendType = GiftSendType_OnMic;
/// ///
GiftSourceType sourceType = giftInfo.sourceType; GiftSourceType sourceType = giftInfo.sourceType;
if(sourceType != GiftSourceType_Normal && sourceType != GiftSourceType_Pack){
sourceType = _segmentType == GiftSegmentType_Pack ? GiftSourceType_Pack :GiftSourceType_Normal;
}
/// ///
RoomSendGiftType roomSendType = [self dealRoomSendGiftType:giftInfo giftCount:giftCount]; RoomSendGiftType roomSendType = [self dealRoomSendGiftType:giftInfo giftCount:giftCount];
if (roomSendType == -1) { if (roomSendType == -1) {
@@ -418,6 +421,9 @@
GiftSendType sendType = GiftSendType_Chat; GiftSendType sendType = GiftSendType_Chat;
/// ///
GiftSourceType sourceType = giftInfo.sourceType; GiftSourceType sourceType = giftInfo.sourceType;
if(sourceType != GiftSourceType_Normal && sourceType != GiftSourceType_Pack){
sourceType = _segmentType == GiftSegmentType_Pack ? GiftSourceType_Pack :GiftSourceType_Normal;
}
/// ///
RoomSendGiftType roomSendType = RoomSendGiftType_ToOne; RoomSendGiftType roomSendType = RoomSendGiftType_ToOne;
self.giftBarView.sendButtonIsEnable = NO; self.giftBarView.sendButtonIsEnable = NO;

View File

@@ -12,6 +12,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPRoomAnimationView : XPRoomAnimationHitView <RoomGuestDelegate> @interface XPRoomAnimationView : XPRoomAnimationHitView <RoomGuestDelegate>
-(void)resumeTimer;
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate; - (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
@end @end

View File

@@ -144,6 +144,9 @@
- (void)dealloc { - (void)dealloc {
[NSObject cancelPreviousPerformRequestsWithTarget:self]; [NSObject cancelPreviousPerformRequestsWithTarget:self];
[[NIMSDK sharedSDK].broadcastManager removeDelegate:self]; [[NIMSDK sharedSDK].broadcastManager removeDelegate:self];
}
-(void)resumeTimer{
if(self.giftEffectTimer != nil){ if(self.giftEffectTimer != nil){
dispatch_resume(self.giftEffectTimer); dispatch_resume(self.giftEffectTimer);
self.giftEffectTimer = nil; self.giftEffectTimer = nil;
@@ -157,7 +160,6 @@
self.giftTimer = nil; self.giftTimer = nil;
} }
} }
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate { - (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
self = [super init]; self = [super init];
if (self) { if (self) {

View File

@@ -1378,6 +1378,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
- (void)exitRoom { - (void)exitRoom {
[self.menuContainerView menuResignFirstResponder]; [self.menuContainerView menuResignFirstResponder];
[self.animationView resumeTimer];
if (self.roomInfo.roomModeType == RoomModeType_Open_Micro_Mode || self.roomInfo.roomModeType == RoomModeType_Open_Blind) { if (self.roomInfo.roomModeType == RoomModeType_Open_Micro_Mode || self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid]; NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
NSString * uid = [AccountInfoStorage instance].getUid; NSString * uid = [AccountInfoStorage instance].getUid;