diff --git a/NEChatUIKit/NEChatUIKit.podspec b/NEChatUIKit/NEChatUIKit.podspec index e3d49a42..17383d57 100644 --- a/NEChatUIKit/NEChatUIKit.podspec +++ b/NEChatUIKit/NEChatUIKit.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = 'NEChatUIKit' - s.version = '10.1.0' + s.version = '10.2.0' s.summary = 'Chat Module of IM.' # This description is used to generate tags and improve search results. @@ -48,6 +48,6 @@ TODO: Add long description of the pod here. s.dependency 'MJRefresh' s.dependency 'SDWebImageWebPCoder' s.dependency 'SDWebImageSVGKitPlugin' - s.dependency 'lottie-ios','2.5.3' + s.dependency 'lottie-ios','4.4.0' end diff --git a/NEChatUIKit/NEChatUIKit/Assets/FunChatUIKit.xcassets/Chat/fun_top_message_Image.imageset/Contents.json b/NEChatUIKit/NEChatUIKit/Assets/FunChatUIKit.xcassets/Chat/fun_top_message_Image.imageset/Contents.json index bff6a9d8..bb318b8e 100644 --- a/NEChatUIKit/NEChatUIKit/Assets/FunChatUIKit.xcassets/Chat/fun_top_message_Image.imageset/Contents.json +++ b/NEChatUIKit/NEChatUIKit/Assets/FunChatUIKit.xcassets/Chat/fun_top_message_Image.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "fun_top_message_Image@2x.png", + "filename" : "fun_top_message_image@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "fun_top_message_Image@3x.png", + "filename" : "fun_top_message_image@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/Contents.json b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/Contents.json new file mode 100644 index 00000000..7a2d7557 --- /dev/null +++ b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "op_ai_word@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "op_ai_word@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/op_ai_word@2x.png b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/op_ai_word@2x.png new file mode 100644 index 00000000..d0647891 Binary files /dev/null and b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/op_ai_word@2x.png differ diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/op_ai_word@3x.png b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/op_ai_word@3x.png new file mode 100644 index 00000000..46a2b5a6 Binary files /dev/null and b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_ai_word.imageset/op_ai_word@3x.png differ diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/Contents.json b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/Contents.json new file mode 100644 index 00000000..f2a81e2a --- /dev/null +++ b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "op_top@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "op_top@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/op_top@2x.png b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/op_top@2x.png new file mode 100644 index 00000000..7d9052b4 Binary files /dev/null and b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/op_top@2x.png differ diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/op_top@3x.png b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/op_top@3x.png new file mode 100644 index 00000000..97799afb Binary files /dev/null and b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_top.imageset/op_top@3x.png differ diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/Contents.json b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/Contents.json new file mode 100644 index 00000000..a0b97b2a --- /dev/null +++ b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "op_untop@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "op_untop@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/op_untop@2x.png b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/op_untop@2x.png new file mode 100644 index 00000000..e8ad0b61 Binary files /dev/null and b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/op_untop@2x.png differ diff --git a/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/op_untop@3x.png b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/op_untop@3x.png new file mode 100644 index 00000000..dd577c4c Binary files /dev/null and b/NEChatUIKit/NEChatUIKit/Assets/NEBaseChatUIKit.xcassets/operation/op_untop.imageset/op_untop@3x.png differ diff --git a/NEChatUIKit/NEChatUIKit/Assets/NormalChatUIKit.xcassets/Chat/top_message_Image.imageset/Contents.json b/NEChatUIKit/NEChatUIKit/Assets/NormalChatUIKit.xcassets/Chat/top_message_Image.imageset/Contents.json index 68462277..1c332271 100644 --- a/NEChatUIKit/NEChatUIKit/Assets/NormalChatUIKit.xcassets/Chat/top_message_Image.imageset/Contents.json +++ b/NEChatUIKit/NEChatUIKit/Assets/NormalChatUIKit.xcassets/Chat/top_message_Image.imageset/Contents.json @@ -5,12 +5,12 @@ "scale" : "1x" }, { - "filename" : "top_message_Image@2x.png", + "filename" : "top_message_image@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "top_message_Image@3x.png", + "filename" : "top_message_image@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/NEChatUIKit/NEChatUIKit/Assets/en.lproj/Localizable.strings b/NEChatUIKit/NEChatUIKit/Assets/en.lproj/Localizable.strings index 921ac574..9fa026ea 100644 --- a/NEChatUIKit/NEChatUIKit/Assets/en.lproj/Localizable.strings +++ b/NEChatUIKit/NEChatUIKit/Assets/en.lproj/Localizable.strings @@ -103,6 +103,8 @@ "message_reedit" = "reedit"; "message_revoke_confirm" = "Wether to recall this message"; "message_delete_confirm"="Wether to delete this message"; +"collection_delete_confirm"="Wether to delete this collection"; +"delete_collection_success"="delete success"; //MARK: toast @@ -219,3 +221,5 @@ "chat_collection_p2p_tip"="From Chat with %@"; "chat_collection_team_tip"="From %@ "; + +"collection_limit"="The number of favorites has reached the limit value"; diff --git a/NEChatUIKit/NEChatUIKit/Assets/zh-Hans.lproj/Localizable.strings b/NEChatUIKit/NEChatUIKit/Assets/zh-Hans.lproj/Localizable.strings index b71f29af..90c404b2 100644 --- a/NEChatUIKit/NEChatUIKit/Assets/zh-Hans.lproj/Localizable.strings +++ b/NEChatUIKit/NEChatUIKit/Assets/zh-Hans.lproj/Localizable.strings @@ -99,6 +99,8 @@ "message_reedit" = "重新编辑"; "message_revoke_confirm" = "确认要撤回该消息吗?"; "message_delete_confirm"="确认要删除该消息吗?"; +"collection_delete_confirm"="确认要删除该收藏吗?"; +"delete_collection_success"="删除成功"; //MARK: toast @@ -216,3 +218,5 @@ "chat_collection_p2p_tip"="来自于 与%@的会话"; "chat_collection_team_tip"="来自于 %@"; + +"collection_limit"="收藏数已达到限制值"; diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/ChatViewController.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/ChatViewController.swift index 6c734fd2..bfa4bb29 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/ChatViewController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/ChatViewController.swift @@ -632,7 +632,6 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD if let ms = weakSelf?.viewModel.messages, ms.count > 0 { weakSelf?.tableViewReload() - weakSelf?.hasFirstLoadData = true if weakSelf?.viewModel.isHistoryChat == true, let num = weakSelf?.tableView.numberOfRows(inSection: 0), index < num, index >= 0 { @@ -654,6 +653,7 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD } else if let err = error { weakSelf?.showErrorToast(err) } + weakSelf?.loadDataFinish() } } @@ -1767,6 +1767,7 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD // record open func recordAudio(_ filePath: String?, didBeganWithError error: Error?) { print("[record] sdk Began error:\(error?.localizedDescription ?? "")") + stopPlay() } open func recordAudio(_ filePath: String?, didCompletedWithError error: Error?) { @@ -2241,7 +2242,11 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD viewModel.collectMessage(operationModel, title ?? "") { [weak self] error in if error != nil { - self?.showToast(chatLocalizable("failed_operation")) + if error?.code == collectionLimitCode { + self?.showToast(chatLocalizable("collection_limit")) + } else { + self?.showToast(chatLocalizable("failed_operation")) + } } else { self?.showToast(chatLocalizable("collection_success")) } @@ -2323,7 +2328,7 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD open func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard indexPath.row < viewModel.messages.count else { return NEBaseChatMessageCell() } - let model = viewModel.messages[indexPath.row] + var model = viewModel.messages[indexPath.row] var reuseId = "\(NEBaseChatMessageCell.self)" if model.replyedModel?.isReplay == true, model.isRevoked == false { @@ -2567,7 +2572,7 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD open func showTextViewController(_ model: MessageContentModel?) { guard let model = model as? MessageTextModel else { return } - let title = NECustomAttachment.titleOfRichText(model.message?.attachment) + let title = NECustomUtils.titleOfRichText(model.message?.attachment) let body = model.attributeStr if !(title?.isEmpty == false), !(body?.string.isEmpty == false) { @@ -2791,7 +2796,7 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD showTextViewController(model) } } else if customType == customMultiForwardType, - let data = NECustomAttachment.dataOfCustomMessage(model?.message?.attachment) { + let data = NECustomUtils.dataOfCustomMessage(model?.message?.attachment) { let url = data["url"] as? String let md5 = data["md5"] as? String guard let fileDirectory = NEPathUtils.getDirectoryForDocuments(dir: "\(imkitDir)file/") else { return } @@ -2850,15 +2855,29 @@ open class ChatViewController: NEChatBaseViewController, UINavigationControllerD extension ChatViewController: TopMessageViewDelegate { /// 点击置顶消息视图中的关闭按钮 public func didClickCloseButton() { + // 校验网络 + if NEChatDetectNetworkTool.shareInstance.manager?.isReachable == false { + showToast(commonLocalizable("network_error")) + return + } + viewModel.untopMessage { [weak self] error in if let err = error { self?.showErrorToast(err) + } else { + self?.topMessageView.removeFromSuperview() } } } /// 点击置顶消息视图 public func didTapTopMessageView() { + // 校验网络 + if NEChatDetectNetworkTool.shareInstance.manager?.isReachable == false { + showToast(commonLocalizable("network_error")) + return + } + var index = -1 for (i, m) in viewModel.messages.enumerated() { if viewModel.topMessage?.messageClientId == m.message?.messageClientId { @@ -2929,7 +2948,7 @@ extension ChatViewController: NEMutilSelectBottomViewDelegate { } // 解析消息中的depth - if let data = NECustomAttachment.dataOfCustomMessage(msg.attachment) { + if let data = NECustomUtils.dataOfCustomMessage(msg.attachment) { if let dep = data["depth"] as? Int { if dep >= customMultiForwardMaxDepth { invalidMessages.append(msg) @@ -3164,6 +3183,7 @@ extension ChatViewController: ChatBaseCellDelegate { } if index >= 0 { + ChatDeduplicationHelper.instance.removeBlackTipSendedId(messageId: msg.messageClientId) viewModel.sendMessage(message: msg) { _, error in if let err = error { print("resend message error: \(err.localizedDescription)") @@ -3188,7 +3208,7 @@ extension ChatViewController: ChatBaseCellDelegate { return } } - let data = NECustomAttachment.dataOfCustomMessage(model?.message?.attachment) + let data = NECustomUtils.dataOfCustomMessage(model?.message?.attachment) let time = message.createTime let date = Date() @@ -3285,7 +3305,9 @@ extension ChatViewController: ChatBaseCellDelegate { ReadViewController(message: message, teamId: teamId) } - open func loadDataFinish() {} + open func loadDataFinish() { + hasFirstLoadData = true + } // MARK: - call kit noti diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/MultiForwardViewController.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/MultiForwardViewController.swift index 40f23ed0..24f3c8d2 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/MultiForwardViewController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/MultiForwardViewController.swift @@ -313,7 +313,7 @@ open class MultiForwardViewController: NEChatBaseViewController, UINavigationCon } } else if model?.type == .custom { if model?.customType == customMultiForwardType, - let data = NECustomAttachment.dataOfCustomMessage(model?.message?.attachment) { + let data = NECustomUtils.dataOfCustomMessage(model?.message?.attachment) { let url = data["url"] as? String let md5 = data["md5"] as? String guard let fileDirectory = NEPathUtils.getDirectoryForDocuments(dir: imkitDir) else { return } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBaseCollectionMessageController.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBaseCollectionMessageController.swift index 773f399a..a166aeb7 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBaseCollectionMessageController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBaseCollectionMessageController.swift @@ -4,6 +4,7 @@ import MJRefresh import NEChatKit +import NECoreIM2Kit import NIMSDK import UIKit @@ -20,10 +21,7 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV tableView.delegate = self tableView.dataSource = self tableView.backgroundColor = .clear -// tableView.mj_footer = MJRefreshBackNormalFooter( -// refreshingTarget: self, -// refreshingAction: #selector(loadMoreData) -// ) + tableView.mj_footer = MJRefreshAutoFooter(refreshingTarget: self, refreshingAction: #selector(loadMoreData)) tableView.keyboardDismissMode = .onDrag return tableView }() @@ -148,10 +146,10 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV } else if customType == customRichTextType { reuseId = "\(MessageType.richText.rawValue)" } else { - reuseId = "\(NEBaseCollectionMessageTextCell.self)" + reuseId = "\(NEBaseCollectionDefaultCell.self)" } - } else if cellClassDic[reuseId] == nil { - reuseId = "\(NEBaseCollectionMessageTextCell.self)" + } else if cellClassDic[reuseId] == nil || model.chatmodel.message == nil { + reuseId = "\(NEBaseCollectionDefaultCell.self)" } let cell = tableView.dequeueReusableCell(withIdentifier: reuseId, for: indexPath) as! NEBaseCollectionMessageCell cell.delegate = self @@ -169,17 +167,35 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV } let model = viewModel.collectionDatas[indexPath.row] + let defaultHeight = 143.0 + if model.message == nil { + // 未解析到message对象,处理各个端可能序列化异常场景,正常不会出现 + return defaultHeight + } + if model.chatmodel.type == .custom { if model.chatmodel.customType == customMultiForwardType { return model.cellHeight(contenttMaxW: collection_content_maxW) - 30 + } else if model.chatmodel.customType != customRichTextType { + // 不支持的自定义消息类型,如果后续有新增富文本类型需要添加处理逻辑 + return defaultHeight } } return model.cellHeight(contenttMaxW: collection_content_maxW) } - /// 取消收藏消息 + /// 弹出删除确认弹框 /// - Parameter model: 收藏消息对象 open func removeCollectionActionClicked(_ model: CollectionMessageModel) { + weak var weakSelf = self + showAlert(message: chatLocalizable("collection_delete_confirm")) { + weakSelf?.didRemoveCollectionActionClicked(model) + } + } + + /// 取消收藏消息 + /// - Parameter model: 收藏消息对象 + open func didRemoveCollectionActionClicked(_ model: CollectionMessageModel) { weak var weakSelf = self if NEChatDetectNetworkTool.shareInstance.manager?.isReachable == false { weakSelf?.showToast(commonLocalizable("network_error")) @@ -201,7 +217,12 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV if weakSelf?.viewModel.collectionDatas.count ?? 0 <= 0 { weakSelf?.collectionEmptyView.isHidden = false } + weakSelf?.showToast(chatLocalizable("delete_collection_success")) weakSelf?.contentTable.reloadData() + + if weakSelf?.viewModel.collectionDatas.count ?? 0 < weakSelf?.viewModel.pageSize ?? 0, weakSelf?.contentTable.mj_footer != nil { + weakSelf?.loadMoreData() + } } } } @@ -300,7 +321,7 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV /// 弹出底操作悬浮框 /// - Parameter model: 收藏对象 open func showActions(_ model: CollectionMessageModel) { - guard let message = model.message else { + if model.collection == nil { return } var actions = [UIAlertAction]() @@ -310,14 +331,14 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV } actions.append(deleteCollectionAction) - if message.messageType == .MESSAGE_TYPE_TEXT { + if model.message?.messageType == .MESSAGE_TYPE_TEXT { let copyAction = UIAlertAction(title: chatLocalizable("operation_copy"), style: .default) { _ in weakSelf?.copyCollectionActionClicked(model) } actions.append(copyAction) } - if message.messageType != .MESSAGE_TYPE_AUDIO { + if model.message?.messageType != .MESSAGE_TYPE_AUDIO { let forwardAction = UIAlertAction(title: chatLocalizable("operation_forward"), style: .default) { _ in weakSelf?.forwardCollectionActionClicked(model) } @@ -367,7 +388,7 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV let player = VideoPlayerViewController() player.totalTime = Int(object.duration) player.modalPresentationStyle = .overFullScreen - + viewModel.lastClickAuidoMessageId = nil let path = object.path ?? ChatMessageHelper.createFilePath(model?.message) if FileManager.default.fileExists(atPath: path) == true { let url = URL(fileURLWithPath: path) @@ -457,10 +478,10 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV NEALog.infoLog(ModuleName + " " + (self?.className() ?? ""), desc: #function + "downLoad file progress: \(progress)") // 根据进度设置状态 - fileModel.progress = progress + fileModel.progress = progress / UInt(100.0) // 更新ui进度 - fileModel.cell?.uploadProgress(progress) + fileModel.cell?.uploadProgress(fileModel.progress) } _: { [weak self] localPath, error in if let err = error { switch err.code { @@ -486,7 +507,7 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV showTextViewController(model) } else if customType == customMultiForwardType, - let data = NECustomAttachment.dataOfCustomMessage(message.attachment) { + let data = NECustomUtils.dataOfCustomMessage(message.attachment) { let url = data["url"] as? String let md5 = data["md5"] as? String @@ -535,23 +556,35 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV /// - Parameter cell: 收藏列表视图对象 /// - Parameter model: 收藏对象 private func didPlay(cell: NEBaseCollectionMessageCell?, model: CollectionMessageModel?) { - guard let message = model?.message, let audio = message.attachment as? V2NIMMessageAudioAttachment else { + guard let message = model?.message, let audio = message.attachment as? V2NIMMessageAudioAttachment, let messageId = message.messageServerId else { return } let path = audio.path ?? ChatMessageHelper.createFilePath(message) if !FileManager.default.fileExists(atPath: path) { if let urlString = audio.url { + if viewModel.audioDownloadSet.contains(messageId) { + // 当前语音消息正在下载无需重新下载 + NEALog.infoLog(className(), desc: #function + " \(messageId) message's audio file downloading, not need download") + return + } + viewModel.audioDownloadSet.insert(messageId) + viewModel.lastClickAuidoMessageId = messageId + viewModel.downloadFile(urlString, path, nil) { [weak self] _, error in + self?.viewModel.audioDownloadSet.remove(messageId) if error == nil { - NEALog.infoLog(ModuleName + " " + ChatViewController.className(), desc: #function + "CALLBACK downLoad") - self?.startPlay(cell: cell, model: model) + NEALog.infoLog(ModuleName + " " + ChatViewController.className(), desc: #function + "collection download audio CALLBACK downLoad") + if self?.viewModel.lastClickAuidoMessageId == messageId { + self?.startPlay(cell: cell, model: model) + } } else { self?.showToast(error!.localizedDescription) } } } } else { + viewModel.lastClickAuidoMessageId = nil startPlay(cell: cell, model: model) } } @@ -637,7 +670,7 @@ open class NEBaseCollectionMessageController: NEChatBaseViewController, UITableV open func showTextViewController(_ model: CollectionMessageModel?) { guard let model = model?.chatmodel as? MessageTextModel else { return } - let title = NECustomAttachment.titleOfRichText(model.message?.attachment) + let title = NECustomUtils.titleOfRichText(model.message?.attachment) let body = model.attributeStr let textView = getTextViewController(title: title, body: body) textView.modalPresentationStyle = .fullScreen diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBasePinMessageViewController.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBasePinMessageViewController.swift index c001b2a5..d19bd24f 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBasePinMessageViewController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Controller/NEBasePinMessageViewController.swift @@ -558,7 +558,7 @@ open class NEBasePinMessageViewController: NEChatBaseViewController, UITableView showTextViewController(model) } else if customType == customMultiForwardType, - let data = NECustomAttachment.dataOfCustomMessage(model?.message.attachment) { + let data = NECustomUtils.dataOfCustomMessage(model?.message.attachment) { let url = data["url"] as? String let md5 = data["md5"] as? String @@ -712,7 +712,7 @@ open class NEBasePinMessageViewController: NEChatBaseViewController, UITableView open func showTextViewController(_ model: NEPinMessageModel?) { guard let model = model?.chatmodel as? MessageTextModel else { return } - let title = NECustomAttachment.titleOfRichText(model.message?.attachment) + let title = NECustomUtils.titleOfRichText(model.message?.attachment) let body = model.attributeStr let textView = getTextViewController(title: title, body: body) textView.modalPresentationStyle = .fullScreen diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatDeduplicationHelper.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatDeduplicationHelper.swift index 25000544..c36b72cd 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatDeduplicationHelper.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatDeduplicationHelper.swift @@ -72,6 +72,17 @@ public class ChatDeduplicationHelper: NSObject, NEIMKitClientListener { return false } + // 移除黑名单消息提示去重 id + public func removeBlackTipSendedId(messageId: String?) { + guard let messageId = messageId else { + return + } + + if blackListMessageIds.contains(messageId) { + blackListMessageIds.remove(messageId) + } + } + // 是否已经发过对应路径的音频消息,防止重复发送 public func isRecordAudioSended(path: String) -> Bool { if recordAudioMessagePaths.contains(path) { diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatMessageHelper.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatMessageHelper.swift index c14e62cd..4af92d43 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatMessageHelper.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ChatMessageHelper.swift @@ -147,6 +147,7 @@ public class ChatMessageHelper: NSObject { isFun ? FunCollectionMessageRichTextCell.self : CollectionMessageRichTextCell.self, "\(NEBasePinMessageTextCell.self)": isFun ? FunCollectionMessageDefaultCell.self : CollectionMessageDefaultCell.self, + "\(NEBaseCollectionDefaultCell.self)": isFun ? FunCollectionDefaultCell.self : CollectionDefaultCell.self, ] } @@ -173,7 +174,7 @@ public class ChatMessageHelper: NSObject { case .MESSAGE_TYPE_CALL: model = MessageCallRecordModel(message: message) case .MESSAGE_TYPE_CUSTOM: - if let type = NECustomAttachment.typeOfCustomMessage(message.attachment) { + if let type = NECustomUtils.typeOfCustomMessage(message.attachment) { if type == customMultiForwardType { return MessageCustomModel(message: message, contentHeight: Int(customMultiForwardCellHeight)) } @@ -182,13 +183,16 @@ public class ChatMessageHelper: NSObject { } // 注册过的自定义消息类型 - return MessageCustomModel(message: message, contentHeight: Int(customMultiForwardCellHeight)) + if NEChatUIKitClient.instance.getRegisterCustomCell()["\(type)"] != nil { + return MessageCustomModel(message: message, contentHeight: Int(customMultiForwardCellHeight)) + } } fallthrough default: // 未识别的消息类型,默认为文本消息类型,text为未知消息体 message.text = chatLocalizable("msg_unknown") model = MessageTextModel(message: message) + model.unkonwMessage = true } return model } @@ -241,7 +245,7 @@ public class ChatMessageHelper: NSObject { model = MessageCallRecordModel(message: message) completion(model) case .MESSAGE_TYPE_CUSTOM: - if let type = NECustomAttachment.typeOfCustomMessage(message.attachment) { + if let type = NECustomUtils.typeOfCustomMessage(message.attachment) { if type == customMultiForwardType { completion(MessageCustomModel(message: message, contentHeight: Int(customMultiForwardCellHeight))) return @@ -252,14 +256,17 @@ public class ChatMessageHelper: NSObject { } // 注册过的自定义消息类型 - completion(MessageCustomModel(message: message, contentHeight: Int(customMultiForwardCellHeight))) - return + if NEChatUIKitClient.instance.getRegisterCustomCell()["\(type)"] != nil { + completion(MessageCustomModel(message: message, contentHeight: Int(customMultiForwardCellHeight))) + return + } } fallthrough default: // 未识别的消息类型,默认为文本消息类型,text为未知消息体 message.text = chatLocalizable("msg_unknown") model = MessageTextModel(message: message) + model.unkonwMessage = true completion(model) } } @@ -336,12 +343,12 @@ public class ChatMessageHelper: NSObject { return chatLocalizable("msg_rtc_call") case .MESSAGE_TYPE_CUSTOM: // 换行消息 - if let content = NECustomAttachment.contentOfRichText(message?.attachment) { + if let content = NECustomUtils.contentOfRichText(message?.attachment) { return content } // 合并转发 - if let customType = NECustomAttachment.typeOfCustomMessage(message?.attachment), + if let customType = NECustomUtils.typeOfCustomMessage(message?.attachment), customType == customMultiForwardType { return "[\(chatLocalizable("chat_history"))]" } @@ -488,7 +495,7 @@ public class ChatMessageHelper: NSObject { refer.messageClientId = params?["idClient"] as? String refer.messageServerId = params?["idServer"] as? String refer.senderId = params?["from"] as? String - refer.createTime = TimeInterval((params?["time"] as? Int ?? 0) / 1000) + refer.createTime = TimeInterval(Double(params?["time"] as? Int ?? 0) / 1000.0) if let conversationId = params?["to"] as? String { refer.conversationId = conversationId refer.receiverId = V2NIMConversationIdUtil.conversationTargetId(conversationId) diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ReplyMessageUtil.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ReplyMessageUtil.swift index 88e26b1f..65403648 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ReplyMessageUtil.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Helper/ReplyMessageUtil.swift @@ -13,7 +13,7 @@ open class ReplyMessageUtil: NSObject { } if model.type == .reply { - if let content = NECustomAttachment.contentOfRichText(model.message?.attachment) { + if let content = NECustomUtils.contentOfRichText(model.message?.attachment) { return text + content } text += "\(model.message?.text ?? chatLocalizable("message_not_found"))" diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageContentModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageContentModel.swift index ba3a6336..0737cdad 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageContentModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageContentModel.swift @@ -23,6 +23,8 @@ open class MessageContentModel: NSObject, MessageModel { public var showSelect: Bool = false // 多选按钮是否展示 public var isSelected: Bool = false // 多选是否选中 + public var isSelectAll: Bool = false // 是否全选 + public var unkonwMessage: Bool = false public var inMultiForward: Bool = false { // 是否是合并消息中的子消息 didSet { // fullNameHeight = 0 // 合并消息中的子消息不显示昵称 diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageCustomModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageCustomModel.swift index 309df740..fbaf89b4 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageCustomModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageCustomModel.swift @@ -17,11 +17,14 @@ open class MessageCustomModel: MessageContentModel { super.init(message: message) type = .custom - if let type = NECustomAttachment.typeOfCustomMessage(message?.attachment) { + if let type = NECustomUtils.typeOfCustomMessage(message?.attachment) { customType = type } contentSize = CGSize(width: 0, height: contentHeight) height = contentSize.height + chat_content_margin * 2 + fullNameHeight + chat_pin_height + if let customHeight = NECustomUtils.heightOfCustomMessage(message?.attachment) { + height = customHeight + } } } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageModel.swift index 77eb54ba..fcf630aa 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageModel.swift @@ -73,5 +73,8 @@ public protocol MessageModel: NSObjectProtocol { var timeContent: String? { get set } // 具体时间 + // 是否是未知消息 + var unkonwMessage: Bool { get set } + init(message: V2NIMMessage?) } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageRichTextModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageRichTextModel.swift index 1c614376..b7c87d73 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageRichTextModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/MessageRichTextModel.swift @@ -13,7 +13,7 @@ open class MessageRichTextModel: MessageTextModel { public var titleTextHeight: CGFloat = 0 public required init(message: V2NIMMessage?) { - guard let data = NECustomAttachment.dataOfCustomMessage(message?.attachment), + guard let data = NECustomUtils.dataOfCustomMessage(message?.attachment), let title = data["title"] as? String else { super.init(message: message) return diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/OperationItem.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/OperationItem.swift index cc965ee3..2e67e575 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/OperationItem.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/Model/OperationItem.swift @@ -93,7 +93,7 @@ open class OperationItem: NSObject { public static func topItem() -> OperationItem { let item = OperationItem() item.text = chatLocalizable("operation_top") - item.imageName = "op_delete" + item.imageName = "op_top" item.type = .top return item } @@ -102,7 +102,7 @@ open class OperationItem: NSObject { public static func untopItem() -> OperationItem { let item = OperationItem() item.text = chatLocalizable("operation_untop") - item.imageName = "op_delete" + item.imageName = "op_untop" item.type = .untop return item } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionDefaultCell.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionDefaultCell.swift new file mode 100644 index 00000000..6f833ef6 --- /dev/null +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionDefaultCell.swift @@ -0,0 +1,13 @@ +//// Copyright (c) 2022 NetEase, Inc. All rights reserved. +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. + +import UIKit + +@objcMembers +open class NEBaseCollectionDefaultCell: NEBaseCollectionMessageTextCell { + override open func configureData(_ model: CollectionMessageModel) { + super.configureData(model) + collectionContentLabel.text = chatLocalizable("unkonw_pin_message") + } +} diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageCell.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageCell.swift index 86582a11..a88dff72 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageCell.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageCell.swift @@ -62,7 +62,6 @@ open class NEBaseCollectionMessageCell: UITableViewCell { label.textColor = .ne_greyText label.translatesAutoresizingMaskIntoConstraints = false label.accessibilityIdentifier = "id.conversation" - label.lineBreakMode = .byTruncatingMiddle return label }() @@ -185,7 +184,7 @@ open class NEBaseCollectionMessageCell: UITableViewCell { open func configureData(_ model: CollectionMessageModel) { collectionModel = model headerView.configHeadData(headUrl: model.chatmodel.avatar, - name: model.chatmodel.shortName ?? "", + name: model.chatmodel.fullName ?? "", uid: model.chatmodel.message?.senderId ?? "") nameLabel.text = model.chatmodel.fullName if let time = model.collection?.updateTime { diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageMultiForwardCell.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageMultiForwardCell.swift index 2b5d842d..56ecf081 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageMultiForwardCell.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/CollectionCell/NEBaseCollectionMessageMultiForwardCell.swift @@ -102,7 +102,7 @@ class NEBaseCollectionMessageMultiForwardCell: NEBaseCollectionMessageCell { override open func configureData(_ model: CollectionMessageModel) { super.configureData(model) - guard let data = NECustomAttachment.dataOfCustomMessage(model.chatmodel.message?.attachment) else { + guard let data = NECustomUtils.dataOfCustomMessage(model.chatmodel.message?.attachment) else { return } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/NEBaseChatMessageCell.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/NEBaseChatMessageCell.swift index 7dd0654b..0f6fff0e 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/NEBaseChatMessageCell.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/NEBaseChatMessageCell.swift @@ -536,21 +536,25 @@ open class NEBaseChatMessageCell: NEChatBaseCell { if isSend, model.message?.sendingState == .MESSAGE_SENDING_STATE_SUCCEEDED { if model.message?.conversationType == .CONVERSATION_TYPE_P2P { - let receiptEnable = model.message?.messageConfig?.readReceiptEnabled ?? false - if receiptEnable, - !model.isRevoked, - SettingRepo.shared.getShowReadStatus(), - NEKitChatConfig.shared.ui.messageProperties.showP2pMessageStatus == true { - readView.isHidden = false - if model.readCount == 1, model.unreadCount == 0 { - readView.progress = 1 + // 话单消息不显示已读未读 + if model.type == .rtcCallRecord { + readView.isHidden = true + } else { + let receiptEnable = model.message?.messageConfig?.readReceiptEnabled ?? false + if receiptEnable, + !model.isRevoked, + SettingRepo.shared.getShowReadStatus(), + NEKitChatConfig.shared.ui.messageProperties.showP2pMessageStatus == true { + readView.isHidden = false + if model.readCount == 1, model.unreadCount == 0 { + readView.progress = 1 + } else { + readView.progress = 0 + } } else { - readView.progress = 0 + readView.isHidden = true } - } else { - readView.isHidden = true } - } else if model.message?.conversationType == .CONVERSATION_TYPE_TEAM { let receiptEnable = model.message?.messageConfig?.readReceiptEnabled ?? false if receiptEnable, diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/PinCell/NEBasePinMessageMultiForwardCell.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/PinCell/NEBasePinMessageMultiForwardCell.swift index 7b5cc0fa..beafbff7 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/PinCell/NEBasePinMessageMultiForwardCell.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/Cell/PinCell/NEBasePinMessageMultiForwardCell.swift @@ -47,7 +47,7 @@ open class NEBasePinMessageMultiForwardCell: NEBasePinMessageCell { override open func configure(_ item: NEPinMessageModel) { super.configure(item) - guard let data = NECustomAttachment.dataOfCustomMessage(item.chatmodel.message?.attachment) else { + guard let data = NECustomUtils.dataOfCustomMessage(item.chatmodel.message?.attachment) else { return } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/ChatView/TopMessageView.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/ChatView/TopMessageView.swift index 0569bf87..ff2af2ee 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/View/ChatView/TopMessageView.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/View/ChatView/TopMessageView.swift @@ -148,13 +148,18 @@ open class TopMessageView: UIView { text = cutName + ":" } - text += content ?? "" - topContentLabel.text = text + let attributedString = NSMutableAttributedString(string: text) + + if let content = content { + let emojiAttr = NEEmotionTool.getAttWithStr(str: content, font: topContentLabel.font) + attributedString.append(emojiAttr) + } + + topContentLabel.attributedText = attributedString } /// 点击关闭按钮 func didClickCloseButton() { - removeFromSuperview() delegate?.didClickCloseButton() } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/ChatViewModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/ChatViewModel.swift index 684fca42..3b46e8ba 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/ChatViewModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/ChatViewModel.swift @@ -379,8 +379,13 @@ open class ChatViewModel: NSObject { indexPaths.append(IndexPath(row: i, section: 0)) } } + + // 更新置顶消息发送者昵称 + if accid == topMessage?.senderId { + delegate?.updateTopName(name: showName) + } + delegate?.onLoadMoreWithMessage(indexPaths) - delegate?.updateTopName(name: showName) } /// 插入消息 @@ -898,10 +903,10 @@ open class ChatViewModel: NSObject { } if message.messageType == .MESSAGE_TYPE_CUSTOM { - if let title = NECustomAttachment.titleOfRichText(message.attachment), !title.isEmpty { + if let title = NECustomUtils.titleOfRichText(message.attachment), !title.isEmpty { muta[revokeLocalMessageContent] = title } - if let body = NECustomAttachment.bodyOfRichText(message.attachment), !body.isEmpty { + if let body = NECustomUtils.bodyOfRichText(message.attachment), !body.isEmpty { muta[revokeLocalMessageContent] = body } } @@ -981,16 +986,17 @@ open class ChatViewModel: NSObject { /// 消息发送成功 let pinItem = model?.isPined == false ? OperationItem.pinItem() : OperationItem.removePinItem() let topItem = model?.message?.messageClientId == topMessage?.messageClientId ? OperationItem.untopItem() : OperationItem.topItem() + switch model?.message?.messageType { case .MESSAGE_TYPE_LOCATION: items.append(contentsOf: [ OperationItem.replayItem(), OperationItem.forwardItem(), pinItem, - topItem, - OperationItem.collectionItem(), OperationItem.deleteItem(), OperationItem.selectItem(), + OperationItem.collectionItem(), + topItem, ]) case .MESSAGE_TYPE_TEXT: items = [ @@ -998,29 +1004,29 @@ open class ChatViewModel: NSObject { OperationItem.replayItem(), OperationItem.forwardItem(), pinItem, - topItem, - OperationItem.collectionItem(), OperationItem.deleteItem(), OperationItem.selectItem(), + OperationItem.collectionItem(), + topItem, ] case .MESSAGE_TYPE_IMAGE, .MESSAGE_TYPE_VIDEO, .MESSAGE_TYPE_FILE: items = [ OperationItem.replayItem(), OperationItem.forwardItem(), pinItem, - topItem, - OperationItem.collectionItem(), OperationItem.deleteItem(), OperationItem.selectItem(), + OperationItem.collectionItem(), + topItem, ] case .MESSAGE_TYPE_AUDIO: items = [ OperationItem.replayItem(), pinItem, - topItem, - OperationItem.collectionItem(), OperationItem.deleteItem(), OperationItem.selectItem(), + OperationItem.collectionItem(), + topItem, ] case .MESSAGE_TYPE_CUSTOM: if (model?.customType ?? 0) > 0 { @@ -1033,15 +1039,14 @@ open class ChatViewModel: NSObject { OperationItem.replayItem(), OperationItem.forwardItem(), pinItem, - topItem, - OperationItem.collectionItem(), OperationItem.deleteItem(), OperationItem.selectItem(), + OperationItem.collectionItem(), + topItem, ]) } else { // 未知消息体 items = [ - OperationItem.collectionItem(), OperationItem.deleteItem(), OperationItem.selectItem(), ] @@ -1055,15 +1060,6 @@ open class ChatViewModel: NSObject { ] } - // 自己发送且非未知消息可以 【撤回】 - if model?.message?.isSelf == true { - if model?.message?.messageType == .MESSAGE_TYPE_CUSTOM, - NECustomAttachment.dataOfCustomMessage(model?.message?.attachment) == nil { - return items - } - items.append(OperationItem.recallItem()) - } - // 根据配置项移除 【收藏】 if IMKitConfigCenter.shared.collectionEnable == false { items.removeAll { item in @@ -1079,12 +1075,29 @@ open class ChatViewModel: NSObject { } // 根据配置项移除 【置顶】 - if IMKitConfigCenter.shared.topEnable == false { + // 单聊移除【置顶】 + if IMKitConfigCenter.shared.topEnable == false || model?.message?.conversationType == .CONVERSATION_TYPE_P2P { items.removeAll { item in item.type == .top || item.type == .untop } } + // 自己发送且非未知消息可以 【撤回】 + if model?.message?.isSelf == true { + if model?.message?.messageType == .MESSAGE_TYPE_CUSTOM, + model?.unkonwMessage == true { + return items + } + + // 【撤回】位置在【删除】后面 + for (i, item) in items.enumerated() { + if item.type == .delete { + items.insert(OperationItem.recallItem(), at: i + 1) + break + } + } + } + return items } @@ -1608,7 +1621,7 @@ open class ChatViewModel: NSObject { let params = V2NIMAddCollectionParams() params.collectionType = Int32(collectionType) params.collectionData = content - params.uniqueId = message.messageClientId + params.uniqueId = message.messageServerId chatRepo.addCollection(params) { collection, error in if let err = error { diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/CollectionMessageViewModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/CollectionMessageViewModel.swift index 82bf016c..48b59092 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/CollectionMessageViewModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/CollectionMessageViewModel.swift @@ -14,6 +14,15 @@ class CollectionMessageViewModel: NSObject { /// 消息API 单例 let chatRepo = ChatRepo.shared + /// 记录音频下载,防止重复下载 + public var audioDownloadSet = Set() + + /// 记录最后点击的音频消息,判断下载完成之后是否需要播放 + public var lastClickAuidoMessageId: String? + + /// 每页大小限制 + public var pageSize: Int32 = 100 + /// 加载收藏数据 /// - Parameter completion: 完成回调 public func loadData(_ completion: @escaping (NSError?, Bool) -> Void) { @@ -28,7 +37,7 @@ class CollectionMessageViewModel: NSObject { let timeInterval = tenYearsAgo!.timeIntervalSince1970 option.beginTime = timeInterval } - option.limit = 100 + option.limit = pageSize option.direction = .QUERY_DIRECTION_DESC chatRepo.getCollections(option) { [weak self] collections, error in if let error = error { @@ -111,7 +120,16 @@ class CollectionMessageViewModel: NSObject { for conversationId in conversationIds { let forwardMessage = MessageUtils.forwardMessage(message: message) ChatMessageHelper.clearForwardAtMark(forwardMessage) - chatRepo.sendMessage(message: forwardMessage, conversationId: conversationId, completion) + if forwardMessage.senderId == nil { + forwardMessage.senderId = IMKitClient.instance.account() + } + + if forwardMessage.conversationId == nil { + forwardMessage.conversationId = conversationId + } + + ChatProvider.shared.sendMessage(message: forwardMessage, conversationId: conversationId, params: nil) { resut, error, progress in + } if let text = comment, !text.isEmpty { sendTextMessage(text, conversationId, completion) } diff --git a/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/TeamChatViewModel.swift b/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/TeamChatViewModel.swift index bf42339a..f97d5220 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/TeamChatViewModel.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/Chat/ViewModel/TeamChatViewModel.swift @@ -24,13 +24,16 @@ open class TeamChatViewModel: ChatViewModel, NETeamListener { override init(conversationId: String) { super.init(conversationId: conversationId) + getTeamMember {} teamRepo.addTeamListener(self) + IMKitClient.instance.addLoginListener(self) } override init(conversationId: String, anchor: V2NIMMessage?) { super.init(conversationId: conversationId, anchor: anchor) - teamRepo.addTeamListener(self) getTeamMember {} + teamRepo.addTeamListener(self) + IMKitClient.instance.addLoginListener(self) } /// 重写 获取用户展示名称 @@ -88,10 +91,10 @@ open class TeamChatViewModel: ChatViewModel, NETeamListener { let content = ChatMessageHelper.contentOfMessage(topMessage) var thumbUrl: String? var isVideo = false - var hideClose = false + var hideClose = true // 获取图片缩略图 - if let attach = topMessage.attachment as? V2NIMMessageFileAttachment, let imageUrl = attach.url { + if let attach = topMessage.attachment as? V2NIMMessageImageAttachment, let imageUrl = attach.url { thumbUrl = ResourceRepo.shared.imageThumbnailURL(imageUrl) } @@ -102,10 +105,8 @@ open class TeamChatViewModel: ChatViewModel, NETeamListener { } // 是否隐藏移除置顶按钮 - if self?.teamMember?.memberRole == .TEAM_MEMBER_ROLE_NORMAL, - let topAllow = extDic[keyAllowTopMessage] as? String, - topAllow == allowAtManagerValue { - hideClose = true + if self?.hasTopMessagePremission() == true { + hideClose = false } self?.delegate?.setTopValue(name: senderName, @@ -398,3 +399,23 @@ open class TeamChatViewModel: ChatViewModel, NETeamListener { } } } + +// MARK: - NEIMKitClientListener + +extension TeamChatViewModel: NEIMKitClientListener { + /// 登录连接状态回调 + /// - Parameter status: 连接状态 + public func onDataSync(_ type: V2NIMDataSyncType, state: V2NIMDataSyncState, error: V2NIMError?) { + // 断网重连后,重新拉取群信息、自己的群成员信息 + if type == .DATA_SYNC_TYPE_TEAM_MEMBER, state == .DATA_SYNC_STATE_COMPLETED { + getTeamInfo(teamId: sessionId) { [weak self] error, team in + if error == nil { + self?.team = team + } + self?.getTeamMember { + self?.loadTopMessage() + } + } + } + } +} diff --git a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/CollectionCell/FunCollectionDefaultCell.swift b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/CollectionCell/FunCollectionDefaultCell.swift new file mode 100644 index 00000000..a08f56dd --- /dev/null +++ b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/CollectionCell/FunCollectionDefaultCell.swift @@ -0,0 +1,16 @@ +//// Copyright (c) 2022 NetEase, Inc. All rights reserved. +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. + +import UIKit + +@objcMembers +open class FunCollectionDefaultCell: NEBaseCollectionDefaultCell { + override open func setupCommonUI() { + super.setupCommonUI() + backLeftConstraint?.constant = 0 + backRightConstraint?.constant = 0 + backView.layer.cornerRadius = 0 + headerView.layer.cornerRadius = 4.0 + } +} diff --git a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/FunChatMessageMultiForwardCell.swift b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/FunChatMessageMultiForwardCell.swift index e46dd92f..ce027698 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/FunChatMessageMultiForwardCell.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Cell/FunChatMessageMultiForwardCell.swift @@ -176,7 +176,7 @@ open class FunChatMessageMultiForwardCell: FunChatMessageBaseCell { override open func setModel(_ model: MessageContentModel, _ isSend: Bool) { super.setModel(model, isSend) - guard let data = NECustomAttachment.dataOfCustomMessage(model.message?.attachment) else { + guard let data = NECustomUtils.dataOfCustomMessage(model.message?.attachment) else { return } diff --git a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunCollectionMessageController.swift b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunCollectionMessageController.swift index d964ca0d..bc78d670 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunCollectionMessageController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunCollectionMessageController.swift @@ -28,9 +28,6 @@ open class FunCollectionMessageController: NEBaseCollectionMessageController { } override open func showActions(_ model: CollectionMessageModel) { - guard let message = model.message else { - return - } var actions = [NECustomAlertAction]() weak var weakSelf = self @@ -39,14 +36,14 @@ open class FunCollectionMessageController: NEBaseCollectionMessageController { } actions.append(deleteCollectionAction) - if message.messageType == .MESSAGE_TYPE_TEXT { + if model.message?.messageType == .MESSAGE_TYPE_TEXT { let copyAction = NECustomAlertAction(title: chatLocalizable("operation_copy")) { weakSelf?.copyCollectionActionClicked(model) } actions.append(copyAction) } - if message.messageType != .MESSAGE_TYPE_AUDIO { + if let message = model.message, message.messageType != .MESSAGE_TYPE_AUDIO { let forwardAction = NECustomAlertAction(title: chatLocalizable("operation_forward")) { weakSelf?.forwardCollectionMessage(message, model.senderName ?? "") } diff --git a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunTeamChatViewController.swift b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunTeamChatViewController.swift index 1cae4e05..9aea8a7b 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunTeamChatViewController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/FunUI/Controller/FunTeamChatViewController.swift @@ -46,7 +46,6 @@ open class FunTeamChatViewController: FunChatViewController, TeamChatViewModelDe popGroupChatVC() } - weak var weakSelf = self // 被移除群聊 if isLeaveTeamByOther { showLeaveTeamAlert() diff --git a/NEChatUIKit/NEChatUIKit/Classes/FunUI/View/FunRecordAudioView.swift b/NEChatUIKit/NEChatUIKit/Classes/FunUI/View/FunRecordAudioView.swift index 623388c4..d8373bb1 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/FunUI/View/FunRecordAudioView.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/FunUI/View/FunRecordAudioView.swift @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT license that can be // found in the LICENSE file. -import Lottie +@_implementationOnly import Lottie import UIKit @objc @@ -26,11 +26,10 @@ open class FunRecordAudioView: UIView { public var minRecordProgressWidth: CGFloat = 165.0 - lazy var lottieView: LOTAnimationView = { - let lottie = LOTAnimationView() + lazy var lottieView: LottieAnimationView = { + let lottie = LottieAnimationView(name: "fun_vioce_data", bundle: coreLoader.bundle) lottie.translatesAutoresizingMaskIntoConstraints = false - lottie.setAnimation(named: "fun_vioce_data", bundle: coreLoader.bundle) - lottie.loopAnimation = true + lottie.loopMode = .loop lottie.contentMode = .scaleToFill lottie.translatesAutoresizingMaskIntoConstraints = false return lottie diff --git a/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/ChatMessageMultiForwardCell.swift b/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/ChatMessageMultiForwardCell.swift index 5f6f720b..dc08557c 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/ChatMessageMultiForwardCell.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/ChatMessageMultiForwardCell.swift @@ -172,7 +172,7 @@ open class ChatMessageMultiForwardCell: NormalChatMessageBaseCell { override open func setModel(_ model: MessageContentModel, _ isSend: Bool) { super.setModel(model, isSend) - guard let data = NECustomAttachment.dataOfCustomMessage(model.message?.attachment) else { + guard let data = NECustomUtils.dataOfCustomMessage(model.message?.attachment) else { return } diff --git a/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/CollectionCell/CollectionDefaultCell.swift b/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/CollectionCell/CollectionDefaultCell.swift new file mode 100644 index 00000000..e2310b2d --- /dev/null +++ b/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Cell/CollectionCell/CollectionDefaultCell.swift @@ -0,0 +1,7 @@ +//// Copyright (c) 2022 NetEase, Inc. All rights reserved. +// Use of this source code is governed by a MIT license that can be +// found in the LICENSE file. + +import UIKit + +class CollectionDefaultCell: NEBaseCollectionDefaultCell {} diff --git a/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Controller/TeamChatViewController.swift b/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Controller/TeamChatViewController.swift index b39f498c..5716ccca 100644 --- a/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Controller/TeamChatViewController.swift +++ b/NEChatUIKit/NEChatUIKit/Classes/NormalUI/Controller/TeamChatViewController.swift @@ -48,7 +48,6 @@ open class TeamChatViewController: NormalChatViewController, TeamChatViewModelDe popGroupChatVC() } - weak var weakSelf = self // 被移除群聊 if isLeaveTeamByOther { showLeaveTeamAlert() diff --git a/NEContactUIKit/NEContactUIKit.podspec b/NEContactUIKit/NEContactUIKit.podspec index af868b84..8b13378e 100644 --- a/NEContactUIKit/NEContactUIKit.podspec +++ b/NEContactUIKit/NEContactUIKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEContactUIKit' - s.version = '10.1.0' + s.version = '10.2.0' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/NEConversationUIKit/NEConversationUIKit.podspec b/NEConversationUIKit/NEConversationUIKit.podspec index 63b76dcb..7273c925 100644 --- a/NEConversationUIKit/NEConversationUIKit.podspec +++ b/NEConversationUIKit/NEConversationUIKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEConversationUIKit' - s.version = '10.1.0' + s.version = '10.2.0' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/NEConversationUIKit/NEConversationUIKit/Classes/Manager/NEAtMessageManager.swift b/NEConversationUIKit/NEConversationUIKit/Classes/Manager/NEAtMessageManager.swift index 09fac0bf..267dcacd 100644 --- a/NEConversationUIKit/NEConversationUIKit/Classes/Manager/NEAtMessageManager.swift +++ b/NEConversationUIKit/NEConversationUIKit/Classes/Manager/NEAtMessageManager.swift @@ -100,8 +100,6 @@ open class NEAtMessageManager: NSObject, NEIMKitClientListener, NEChatListener { /// - Returns: 是否是当前用户 open func isAtCurrentUser(sessionId: String) -> Bool { let dic = getMessageDic() - NEALog.infoLog(className(), desc: "session id : \(sessionId)") - NEALog.infoLog(className(), desc: "dic : \(dic)") if let model = dic[sessionId], model.isRead == false { NEALog.infoLog(className(), desc: "read == false") diff --git a/NEConversationUIKit/NEConversationUIKit/Classes/NormalUI/Controller/ConversationController.swift b/NEConversationUIKit/NEConversationUIKit/Classes/NormalUI/Controller/ConversationController.swift index 0f072b91..5d141c98 100644 --- a/NEConversationUIKit/NEConversationUIKit/Classes/NormalUI/Controller/ConversationController.swift +++ b/NEConversationUIKit/NEConversationUIKit/Classes/NormalUI/Controller/ConversationController.swift @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT license that can be // found in the LICENSE file. +import NECommonKit import NECommonUIKit import NECoreKit import NIMSDK diff --git a/NEConversationUIKit/NEConversationUIKit/Classes/Util/NEMessageUtil.swift b/NEConversationUIKit/NEConversationUIKit/Classes/Util/NEMessageUtil.swift index 89430df5..30f634e0 100644 --- a/NEConversationUIKit/NEConversationUIKit/Classes/Util/NEMessageUtil.swift +++ b/NEConversationUIKit/NEConversationUIKit/Classes/Util/NEMessageUtil.swift @@ -45,12 +45,12 @@ open class NEMessageUtil { /// 返回自定义消息的外显文案 static func contentOfCustomMessage(_ attachment: V2NIMMessageAttachment?) -> String { - if let customType = NECustomAttachment.typeOfCustomMessage(attachment) { + if let customType = NECustomUtils.typeOfCustomMessage(attachment) { if customType == customMultiForwardType { return localizable("chat_history") } if customType == customRichTextType { - if let data = NECustomAttachment.dataOfCustomMessage(attachment), + if let data = NECustomUtils.dataOfCustomMessage(attachment), let title = data["title"] as? String { return title } diff --git a/NEMapKit/.gitignore b/NEMapKit/.gitignore deleted file mode 100644 index 805ffc7d..00000000 --- a/NEMapKit/.gitignore +++ /dev/null @@ -1,36 +0,0 @@ -# macOS -.DS_Store - -# Xcode -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa - -# Bundler -.bundle - -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -# Note: if you ignore the Pods directory, make sure to uncomment -# `pod install` in .travis.yml -# -# Pods/ diff --git a/NEMapKit/.travis.yml b/NEMapKit/.travis.yml deleted file mode 100644 index b8efd60c..00000000 --- a/NEMapKit/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# references: -# * https://www.objc.io/issues/6-build-tools/travis-ci/ -# * https://github.com/supermarin/xcpretty#usage - -osx_image: xcode7.3 -language: objective-c -# cache: cocoapods -# podfile: Example/Podfile -# before_install: -# - gem install cocoapods # Since Travis is not always on latest version -# - pod install --project-directory=Example -script: -- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/NEMapKit.xcworkspace -scheme NEMapKit-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty -- pod lib lint diff --git a/NEMapKit/NEMapKit.podspec b/NEMapKit/NEMapKit.podspec index 05b0b2ba..8e60f63f 100644 --- a/NEMapKit/NEMapKit.podspec +++ b/NEMapKit/NEMapKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEMapKit' - s.version = '10.1.0' + s.version = '10.2.0' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/NETeamUIKit/NETeamUIKit.podspec b/NETeamUIKit/NETeamUIKit.podspec index eadf72e4..6eebc308 100644 --- a/NETeamUIKit/NETeamUIKit.podspec +++ b/NETeamUIKit/NETeamUIKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NETeamUIKit' - s.version = '10.1.0' + s.version = '10.2.0' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/NETeamUIKit/NETeamUIKit/Classes/Setting/ViewModel/TeamManagerViewModel.swift b/NETeamUIKit/NETeamUIKit/Classes/Setting/ViewModel/TeamManagerViewModel.swift index aa2422f0..6c824d64 100644 --- a/NETeamUIKit/NETeamUIKit/Classes/Setting/ViewModel/TeamManagerViewModel.swift +++ b/NETeamUIKit/NETeamUIKit/Classes/Setting/ViewModel/TeamManagerViewModel.swift @@ -291,7 +291,7 @@ open class TeamManagerViewModel: NSObject, NETeamListener { dic[keyAllowTopMessage] = value dic["lastOpt"] = keyAllowTopMessage let info = NECommonUtil.getJSONStringFromDictionary(dic) - weakSelf?.teamRepo.updateTeamExtension(tid, .TEAM_TYPE_NORMAL, info) { error in + weakSelf?.teamRepo.updateTeamExtension(tid, .TEAM_TYPE_NORMAL, info, .TEAM_UPDATE_EXTENSION_MODE_ALL) { error in completion(error) } } @@ -300,7 +300,7 @@ open class TeamManagerViewModel: NSObject, NETeamListener { dic[keyAllowTopMessage] = value dic["lastOpt"] = keyAllowTopMessage let info = NECommonUtil.getJSONStringFromDictionary(dic) - weakSelf?.teamRepo.updateTeamExtension(tid, .TEAM_TYPE_NORMAL, info) { error in + weakSelf?.teamRepo.updateTeamExtension(tid, .TEAM_TYPE_NORMAL, info, .TEAM_UPDATE_EXTENSION_MODE_ALL) { error in completion(error) } } diff --git a/Podfile b/Podfile index cbb97287..089ce32f 100644 --- a/Podfile +++ b/Podfile @@ -8,16 +8,16 @@ target 'app' do # 基础库 pod 'NIMSDK_LITE','10.2.6-beta' - pod 'NEChatKit', '10.1.1' + pod 'NEChatKit', '10.2.0' # UI 组件,依次为通讯录组件、会话列表组件、会话(聊天)组件、群相关设置组件 - pod 'NEChatUIKit', '10.1.1' - pod 'NEContactUIKit', '10.1.1' - pod 'NEConversationUIKit', '10.1.1' - pod 'NETeamUIKit', '10.1.1' + pod 'NEChatUIKit', '10.2.0' + pod 'NEContactUIKit', '10.2.0' + pod 'NEConversationUIKit', '10.2.0' + pod 'NETeamUIKit', '10.2.0' # 扩展库-地理位置组件 - pod 'NEMapKit', '10.1.1' + pod 'NEMapKit', '10.2.0' # 扩展库-呼叫组件 pod 'NERtcCallKit/NOS_Special', '2.4.0' diff --git a/app.xcodeproj/project.pbxproj b/app.xcodeproj/project.pbxproj index 71f6b995..d2a283c7 100644 --- a/app.xcodeproj/project.pbxproj +++ b/app.xcodeproj/project.pbxproj @@ -651,7 +651,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 10.1.0; + MARKETING_VERSION = 10.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.netease.yunxin.app.im; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -700,7 +700,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 10.1.0; + MARKETING_VERSION = 10.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.netease.yunxin.app.im; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = inHouseYunxin; diff --git a/app/en.lproj/Localizable.strings b/app/en.lproj/Localizable.strings index 71da2335..22d4f23d 100644 --- a/app/en.lproj/Localizable.strings +++ b/app/en.lproj/Localizable.strings @@ -5,7 +5,7 @@ "open_push"="Please open the push in the setting"; "message"="Message"; -"qchat"="Qchat"; +"qchat"="QChat"; "contact"="Contact"; "mine"="Me"; "logout"="Log out"; @@ -22,9 +22,8 @@ "change_phone_failure"="Set mobile Failed"; "change_email_failure"="Set e-mail Failed"; "change_sign_failure"="Set What's up Failed"; -"copy_success"="Copy ssuccessfully"; "save"="Save"; -"birehday"="Birthday"; +"birthday"="Birthday"; "phone"="Mobile"; "email"="E-mail"; "sign_remind"="sign remind"; @@ -36,7 +35,7 @@ "delete_friend"="删除好友是否同步删除备注";//功能移除可删除 "message_read_function"="Read/Unread"; "version"="Version"; -"headImage"="Avator"; +"headImage"="Avatar"; "nickname"="Nick Name"; "account"="ID"; "gneder"="Sex"; @@ -69,3 +68,5 @@ "change_normal_style"="是否切换基础版?"; "change_fun_style"="是否切换娱乐版?"; + +"mine_collection"="Collection"; diff --git a/app/zh-Hans.lproj/Localizable.strings b/app/zh-Hans.lproj/Localizable.strings index 0fcda6ac..5b9acb49 100644 --- a/app/zh-Hans.lproj/Localizable.strings +++ b/app/zh-Hans.lproj/Localizable.strings @@ -22,9 +22,8 @@ "change_phone_failure"="修改手机号失败"; "change_email_failure"="修改邮箱失败"; "change_sign_failure"="修改签名失败"; -"copy_success"="复制成功"; "save"="完成"; -"birehday"="生日"; +"birthday"="生日"; "phone"="手机"; "email"="邮箱"; "sign_remind"="个性签名消息提醒"; @@ -69,3 +68,5 @@ "change_normal_style"="是否切换基础版?"; "change_fun_style"="是否切换娱乐版?"; + +"mine_collection"="收藏";