diff --git a/README.md b/README.md index f497c0d..677fe79 100755 --- a/README.md +++ b/README.md @@ -1041,6 +1041,13 @@ chatViewManager.orientationMask = UIInterfaceOrientationMaskPortrait; #### 更新记录: +sdk v5.2.11版本更新功能: + +1、机器人转人工 +2、横屏聊天信息溢出屏幕外修复 + +----- + sdk v5.2.10版本更新功能: 1、修复 富文本嵌入图片打开 diff --git a/UdeskSDK.podspec b/UdeskSDK.podspec index 1c99c91..6882eaf 100644 --- a/UdeskSDK.podspec +++ b/UdeskSDK.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'UdeskSDK' - s.version = '5.2.10' + s.version = '5.2.11' s.license = 'MIT' s.summary = 'Udesk SDK for iOS' s.homepage = 'https://github.com/udesk/UdeskSDK-iOS' diff --git a/UdeskSDK/SDK/libUdesk.a b/UdeskSDK/SDK/libUdesk.a index 7f40b13..563d2dd 100644 Binary files a/UdeskSDK/SDK/libUdesk.a and b/UdeskSDK/SDK/libUdesk.a differ diff --git a/UdeskSDK/UDChatMessage/UDIM/Models/Messages/UdeskBaseMessage.m b/UdeskSDK/UDChatMessage/UDIM/Models/Messages/UdeskBaseMessage.m index 213a866..2002c86 100644 --- a/UdeskSDK/UDChatMessage/UDIM/Models/Messages/UdeskBaseMessage.m +++ b/UdeskSDK/UDChatMessage/UDIM/Models/Messages/UdeskBaseMessage.m @@ -129,7 +129,7 @@ - (void)layoutDate { //转人工 - (void)layoutTransfer { - if ([self.message.switchStaffType isEqualToString:@"1"]) { + if ([self.message.switchStaffType isEqualToString:@"1"] || [self.message.switchStaffType isEqualToString:@"4"]) { _transferHeight = kUDTransferHeight + kUDTransferVerticalEdgeSpacing; } } diff --git a/UdeskSDK/UDChatMessage/UDIM/Views/Cells/UdeskBaseCell.m b/UdeskSDK/UDChatMessage/UDIM/Views/Cells/UdeskBaseCell.m index 45fad1f..b39a745 100644 --- a/UdeskSDK/UDChatMessage/UDIM/Views/Cells/UdeskBaseCell.m +++ b/UdeskSDK/UDChatMessage/UDIM/Views/Cells/UdeskBaseCell.m @@ -301,7 +301,9 @@ - (void)tapResetButtonAction:(UIButton *)button { #pragma mark - 机器人转人工 - (void)setupAnswerTransfer { - if ([self.baseMessage.message.switchStaffType isKindOfClass:[NSString class]] && [self.baseMessage.message.switchStaffType isEqualToString:@"1"]) { + if ([self.baseMessage.message.switchStaffType isKindOfClass:[NSString class]] && ([self.baseMessage.message.switchStaffType isEqualToString:@"1"] || + [self.baseMessage.message.switchStaffType isEqualToString:@"4"]) + ) { if (![UdeskSDKUtil isBlankString:self.baseMessage.message.switchStaffTips]) { CGSize size = [UdeskStringSizeUtil sizeWithText:self.baseMessage.message.switchStaffTips font:[UIFont systemFontOfSize:14] size:CGSizeMake(UD_SCREEN_WIDTH-(kUDBubbleToHorizontalEdgeSpacing*2), kUDTransferHeight)]; diff --git a/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/Base.lproj/UdeskLocalizable.strings b/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/Base.lproj/UdeskLocalizable.strings index 85d1166..038f31e 100644 --- a/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/Base.lproj/UdeskLocalizable.strings +++ b/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/Base.lproj/UdeskLocalizable.strings @@ -81,6 +81,7 @@ "udesk_search" = "搜索"; "udesk_video_export_failed" = "视频导出失败"; "udesk_agent_transfer_tip" = "客服转接成功,@为您服务"; +"udesk_showTransfer_place_tip" = "推荐您进行转人工咨询~"; "udesk_preview" = "预览"; "udesk_full_image" = "原图"; diff --git a/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/en.lproj/UdeskLocalizable.strings b/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/en.lproj/UdeskLocalizable.strings index 5cee469..6517def 100644 --- a/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/en.lproj/UdeskLocalizable.strings +++ b/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/en.lproj/UdeskLocalizable.strings @@ -82,6 +82,7 @@ "udesk_search" = "Search"; "udesk_video_export_failed" = "Video export failed"; "udesk_agent_transfer_tip" = "Agent transferred successfully, @ is at your service"; +"udesk_showTransfer_place_tip" = "Recommend you to transfer to customer service~"; "udesk_preview" = "Preview"; "udesk_full_image" = "Full Image"; diff --git a/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/zh-Hans.lproj/UdeskLocalizable.strings b/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/zh-Hans.lproj/UdeskLocalizable.strings index 560b241..ee28c51 100644 --- a/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/zh-Hans.lproj/UdeskLocalizable.strings +++ b/UdeskSDK/UDChatMessage/UDResource/UdeskBundle.bundle/Contents/Resources/zh-Hans.lproj/UdeskLocalizable.strings @@ -82,6 +82,7 @@ "udesk_search" = "搜索"; "udesk_video_export_failed" = "视频导出失败"; "udesk_agent_transfer_tip" = "客服转接成功,@为您服务"; +"udesk_showTransfer_place_tip" = "推荐您进行转人工咨询~"; "udesk_preview" = "预览"; "udesk_full_image" = "原图"; diff --git a/UdeskSDK/UDChatMessage/UDTools/Macro/UdeskSDKMacro.h b/UdeskSDK/UDChatMessage/UDTools/Macro/UdeskSDKMacro.h index c86d87b..8726d68 100755 --- a/UdeskSDK/UDChatMessage/UDTools/Macro/UdeskSDKMacro.h +++ b/UdeskSDK/UDChatMessage/UDTools/Macro/UdeskSDKMacro.h @@ -54,7 +54,17 @@ _Pragma("clang diagnostic pop") #endif // Size -#define UD_SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width +#define UD_SCREEN_WIDTH ({ \ +CGFloat udWidth = [[UIScreen mainScreen] bounds].size.width; \ +if (udIsLandScape) { \ + if (udIsIPhoneXSeries) { \ + udWidth = [[UIScreen mainScreen] bounds].size.width-44*2; \ + } \ +} \ +udWidth; \ +}) + +//#define UD_SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width #define UD_SCREEN_HEIGHT [[UIScreen mainScreen] bounds].size.height // 是否IOS13 @@ -97,6 +107,16 @@ if (@available(iOS 11.0, *)) { \ ipX; \ }) +// 判断当前屏幕是否是横屏 +#define udIsLandScape ({ \ +BOOL isL = NO; \ +if ([UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationLandscapeRight || \ + [UIApplication sharedApplication].statusBarOrientation == UIDeviceOrientationLandscapeLeft) { \ + isL = YES; \ +} \ +isL; \ +}) + // View 圆角和加边框 #define UDViewBorderRadius(View, Radius, Width, Color)\ \ diff --git a/UdeskSDKExample/UdeskSDKExample.xcodeproj/project.pbxproj b/UdeskSDKExample/UdeskSDKExample.xcodeproj/project.pbxproj index dcecac9..d40f0a9 100644 --- a/UdeskSDKExample/UdeskSDKExample.xcodeproj/project.pbxproj +++ b/UdeskSDKExample/UdeskSDKExample.xcodeproj/project.pbxproj @@ -2511,7 +2511,7 @@ "$(inherited)", "\"$(SRCROOT)/../UdeskSDK/SDK\"", ); - MARKETING_VERSION = 5.2.10; + MARKETING_VERSION = 5.2.11; OTHER_LDFLAGS = ( "$(inherited)", "-l\"c++\"", @@ -2604,7 +2604,7 @@ "$(inherited)", "\"$(SRCROOT)/../UdeskSDK/SDK\"", ); - MARKETING_VERSION = 5.2.10; + MARKETING_VERSION = 5.2.11; OTHER_LDFLAGS = ( "$(inherited)", "-l\"c++\"",