Skip to content

Commit 53d6232

Browse files
authored
v10.8.6 (#443)
* v10.8.6 * add custom contact viewController simple code ---------
1 parent 748523f commit 53d6232

File tree

19 files changed

+187
-33
lines changed

19 files changed

+187
-33
lines changed

NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageAudioCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class NEBaseCollectionMessageAudioCell: NEBaseCollectionMessageCell {
3737
override open func setupCommonUI() {
3838
super.setupCommonUI()
3939

40-
let receiveImage = ChatUIConfig.shared.messageProperties.leftBubbleBg ?? UIImage.ne_imageNamed(name: "chat_message_receive")
40+
let receiveImage = ChatUIConfig.shared.messageProperties.receiveMessageBgImage ?? UIImage.ne_imageNamed(name: "chat_message_receive")
4141
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
4242
bubbleImage.image = receiveImage?.resizableImage(withCapInsets: backgroundImageCapInsets)
4343
} else {

NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/NEBaseChatMessageCell.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ open class NEBaseChatMessageCell: NEChatBaseCell {
123123
}
124124

125125
open func setBubbleImage() {
126-
var image = ChatUIConfig.shared.messageProperties.leftBubbleBg ?? UIImage.ne_imageNamed(name: "chat_message_receive")
127-
bubbleImageLeft.backgroundColor = ChatUIConfig.shared.messageProperties.receiveMessageBg
126+
var image = ChatUIConfig.shared.messageProperties.receiveMessageBgImage ?? UIImage.ne_imageNamed(name: "chat_message_receive")
127+
bubbleImageLeft.backgroundColor = ChatUIConfig.shared.messageProperties.receiveMessageBgColor
128128

129129
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
130130
bubbleImageLeft.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)
@@ -133,8 +133,8 @@ open class NEBaseChatMessageCell: NEChatBaseCell {
133133
bubbleImageLeft.contentMode = .scaleAspectFill
134134
}
135135

136-
image = ChatUIConfig.shared.messageProperties.rightBubbleBg ?? UIImage.ne_imageNamed(name: "chat_message_send")
137-
bubbleImageRight.backgroundColor = ChatUIConfig.shared.messageProperties.selfMessageBg
136+
image = ChatUIConfig.shared.messageProperties.selfMessageBgImage ?? UIImage.ne_imageNamed(name: "chat_message_send")
137+
bubbleImageRight.backgroundColor = ChatUIConfig.shared.messageProperties.selfMessageBgColor
138138

139139
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
140140
bubbleImageRight.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)

NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/PinCell/NEBasePinMessageAudioCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ open class NEBasePinMessageAudioCell: NEBasePinMessageCell {
2323
override open func setupUI() {
2424
super.setupUI()
2525

26-
let image = ChatUIConfig.shared.messageProperties.leftBubbleBg ?? UIImage.ne_imageNamed(name: "chat_message_receive")
26+
let image = ChatUIConfig.shared.messageProperties.receiveMessageBgImage ?? UIImage.ne_imageNamed(name: "chat_message_receive")
2727
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
2828
bubbleImage.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)
2929
} else {

NEChatUIKit/NEChatUIKit/Classes/ChatConfig/ChatUIConfig.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ public class MessageProperties: NSObject {
125125
public var inputPlaceholderTextColor: UIColor?
126126

127127
// 自己发送的消息体的背景色
128-
public var selfMessageBg: UIColor = .clear
128+
public var selfMessageBgColor: UIColor = .clear
129129

130130
// 接收到的消息体的背景色
131-
public var receiveMessageBg: UIColor = .clear
131+
public var receiveMessageBgColor: UIColor = .clear
132132

133-
// 右侧聊天背景气泡
134-
public var rightBubbleBg: UIImage?
133+
// 自己发送的消息体的背景气泡
134+
public var selfMessageBgImage: UIImage?
135135

136-
// 左侧聊天背景气泡
137-
public var leftBubbleBg: UIImage?
136+
// 接收到的消息体的背景气泡
137+
public var receiveMessageBgImage: UIImage?
138138

139139
// 气泡图片拉伸参数(边距偏移)
140140
public var backgroundImageCapInsets: UIEdgeInsets? = UIEdgeInsets(top: 35, left: 25, bottom: 10, right: 25)

NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/CollectionCell/FunCollectionMessageAudioCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FunCollectionMessageAudioCell: NEBaseCollectionMessageAudioCell {
3131
override open func setupCommonUI() {
3232
super.setupCommonUI()
3333
setFunStyle()
34-
let image = ChatUIConfig.shared.messageProperties.leftBubbleBg ?? UIImage.ne_imageNamed(name: "fun_pin_message_audio_bg")
34+
let image = ChatUIConfig.shared.messageProperties.receiveMessageBgImage ?? UIImage.ne_imageNamed(name: "fun_pin_message_audio_bg")
3535
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
3636
bubbleImage.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)
3737
} else {

NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/FunChatMessageBaseCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ open class FunChatMessageBaseCell: NEBaseChatMessageCell {
201201
readView.borderLayer.strokeColor = UIColor.funChatThemeColor.cgColor
202202
readView.sectorLayer.fillColor = UIColor.funChatThemeColor.cgColor
203203

204-
var image = ChatUIConfig.shared.messageProperties.leftBubbleBg ?? UIImage.ne_imageNamed(name: "chat_message_receive_fun")
204+
var image = ChatUIConfig.shared.messageProperties.receiveMessageBgImage ?? UIImage.ne_imageNamed(name: "chat_message_receive_fun")
205205
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
206206
bubbleImageLeft.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)
207207
} else {
208208
bubbleImageLeft.image = image
209209
bubbleImageLeft.contentMode = .scaleAspectFill
210210
}
211211

212-
image = ChatUIConfig.shared.messageProperties.rightBubbleBg ?? UIImage.ne_imageNamed(name: "chat_message_send_fun")
212+
image = ChatUIConfig.shared.messageProperties.selfMessageBgImage ?? UIImage.ne_imageNamed(name: "chat_message_send_fun")
213213
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
214214
bubbleImageRight.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)
215215
} else {

NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/PinCell/FunPinMessageAudioCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ open class FunPinMessageAudioCell: NEBasePinMessageAudioCell {
1313
backRightConstraint?.constant = 0
1414
backView.layer.cornerRadius = 0
1515
headerView.layer.cornerRadius = 4.0
16-
let image = ChatUIConfig.shared.messageProperties.leftBubbleBg ?? UIImage.ne_imageNamed(name: "fun_pin_message_audio_bg")
16+
let image = ChatUIConfig.shared.messageProperties.receiveMessageBgImage ?? UIImage.ne_imageNamed(name: "fun_pin_message_audio_bg")
1717
if let backgroundImageCapInsets = ChatUIConfig.shared.messageProperties.backgroundImageCapInsets {
1818
bubbleImage.image = image?.resizableImage(withCapInsets: backgroundImageCapInsets)
1919
} else {

NECommonUIKit/NECommonUIKit/Assets/en.lproj/Localizable.strings

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,7 @@
6565
"detect_mailto_title"="Send message to\“%@\”";
6666
"detect_mailto_send"="Send via default email account";
6767
"detect_mailto_copy"="Copy Email";
68+
69+
"request_timed_out"="Request timed out. Please try again.";
70+
"invalid_URL"="Invalid URL";
71+
"failed_to_load"="Failed to load. Error code: %d";

NECommonUIKit/NECommonUIKit/Assets/zh-Hans.lproj/Localizable.strings

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@
6666
"detect_mailto_title"="向\“%@\”发送邮件";
6767
"detect_mailto_send"="使用默认邮件账户";
6868
"detect_mailto_copy"="复制邮箱";
69+
70+
"request_timed_out"="请求超时,请重试";
71+
"invalid_URL"="无效的网页地址";
72+
"failed_to_load"="加载失败,错误代码:";

NECommonUIKit/NECommonUIKit/Classes/CommonView/NELinkableLabel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2+
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
3+
// Use of this source code is governed by a MIT license that can be
4+
// found in the LICENSE file.
5+
16
import UIKit
27

38
@objc

0 commit comments

Comments
 (0)