diff --git a/NEAISearchKit/NEAISearchKit.podspec b/NEAISearchKit/NEAISearchKit.podspec index 302edfa6..a76c809a 100644 --- a/NEAISearchKit/NEAISearchKit.podspec +++ b/NEAISearchKit/NEAISearchKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEAISearchKit' - s.version = '1.0.0' + s.version = '1.0.3' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. @@ -38,7 +38,7 @@ TODO: Add long description of the pod here. s.resource = 'NEAISearchKit/Assets/**/*' s.dependency 'NEChatKit' - s.dependency 'NECommonUIKit', '9.7.0' + s.dependency 'NECommonUIKit', '9.7.3' s.dependency 'lottie-ios','4.4.0' end diff --git a/NEChatUIKit/NEChatUIKit.podspec b/NEChatUIKit/NEChatUIKit.podspec index 5e7ea6d8..0fedab29 100644 --- a/NEChatUIKit/NEChatUIKit.podspec +++ b/NEChatUIKit/NEChatUIKit.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = 'NEChatUIKit' - s.version = '10.4.0' + s.version = '10.4.1' s.summary = 'Chat Module of IM.' # This description is used to generate tags and improve search results. diff --git a/NEContactUIKit/NEContactUIKit.podspec b/NEContactUIKit/NEContactUIKit.podspec index dbf110a9..0c87fd38 100644 --- a/NEContactUIKit/NEContactUIKit.podspec +++ b/NEContactUIKit/NEContactUIKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEContactUIKit' - s.version = '10.4.0' + s.version = '10.4.1' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/NEContactUIKit/NEContactUIKit/Classes/Validation/Controller/NEBaseValidationMessageViewController.swift b/NEContactUIKit/NEContactUIKit/Classes/Validation/Controller/NEBaseValidationMessageViewController.swift index 1488d8cc..434a16eb 100644 --- a/NEContactUIKit/NEContactUIKit/Classes/Validation/Controller/NEBaseValidationMessageViewController.swift +++ b/NEContactUIKit/NEContactUIKit/Classes/Validation/Controller/NEBaseValidationMessageViewController.swift @@ -70,66 +70,21 @@ open class NEBaseValidationMessageViewController: NEContactBaseViewController { tableView.sectionHeaderTopPadding = 0.0 } - tableView.mj_header = MJRefreshNormalHeader( - refreshingTarget: self, - refreshingAction: #selector(loadData) - ) return tableView }() - /// 表格添加底部 loading - func addBottomLoadMore() { - let footer = MJRefreshAutoFooter( - refreshingTarget: self, - refreshingAction: #selector(loadMoreData) - ) - footer.triggerAutomaticallyRefreshPercent = -10 - tableView.mj_footer = footer - } - - /// 表格移除底部 loading - func removeBottomLoadMore() { - tableView.mj_footer?.endRefreshingWithNoMoreData() - tableView.mj_footer = nil - } - /// 加载数据 func loadData() { viewModel.loadApplicationList(true) { [weak self] finished, error in if let err = error { NEALog.errorLog(ModuleName + " " + NEBaseValidationMessageViewController.className(), desc: "loadApplicationList CALLBACK error: \(err.localizedDescription)") } else { - if finished { - self?.removeBottomLoadMore() - } else { - self?.addBottomLoadMore() - } - - self?.tableView.mj_header?.endRefreshing() self?.emptyView.isHidden = (self?.viewModel.datas.count ?? 0) > 0 self?.tableView.reloadData() } } } - /// 加载更多 - func loadMoreData() { - viewModel.loadApplicationList(false) { [weak self] finished, error in - if let err = error { - NEALog.errorLog(ModuleName + " " + NEBaseValidationMessageViewController.className(), desc: "loadMoreApplicationList CALLBACK error: \(err.localizedDescription)") - } else { - if finished { - self?.removeBottomLoadMore() - } else { - self?.addBottomLoadMore() - } - - self?.tableView.mj_footer?.endRefreshing() - self?.tableView.reloadData() - } - } - } - func initNav() { let clearItem = UIBarButtonItem( title: localizable("clear"), @@ -205,13 +160,8 @@ extension NEBaseValidationMessageViewController: SystemNotificationCellDelegate /// - notifiModel: 申请模型 /// - notiStatus: 处理状态 public func changeValidationStatus(notifiModel: NENotification, notiStatus: NEHandleStatus) { - notifiModel.handleStatus = notiStatus - notifiModel.unReadCount = 0 - for msg in notifiModel.msgList ?? [] { - msg.handleStatus = notiStatus - } - DispatchQueue.main.async { + self.loadData() self.tableView.reloadData() } } diff --git a/NEContactUIKit/NEContactUIKit/Classes/Validation/ViewModel/ValidationMessageViewModel.swift b/NEContactUIKit/NEContactUIKit/Classes/Validation/ViewModel/ValidationMessageViewModel.swift index 7e2c43a6..34120eaf 100644 --- a/NEContactUIKit/NEContactUIKit/Classes/Validation/ViewModel/ValidationMessageViewModel.swift +++ b/NEContactUIKit/NEContactUIKit/Classes/Validation/ViewModel/ValidationMessageViewModel.swift @@ -13,6 +13,7 @@ open class ValidationMessageViewModel: NSObject, NEContactListener { var datas = [NENotification]() var dataRefresh: (() -> Void)? var offset: UInt = 0 // 查询的偏移量 + var finished: Bool = false // 是否还有数据 var pageMaxLimit: UInt = 100 // 查询的每页数量 override init() { @@ -32,14 +33,22 @@ open class ValidationMessageViewModel: NSObject, NEContactListener { let offset = firstLoad ? 0 : offset if firstLoad { + finished = false datas.removeAll() } + + if finished { + completin(true, nil) + return + } + getValidationMessage(offset) { [weak self] offset, finished, error in if let err = error { completin(finished, err) } else { self?.offset = offset - completin(finished, nil) + self?.finished = finished + self?.loadApplicationList(false, completin) } } } @@ -140,7 +149,7 @@ open class ValidationMessageViewModel: NSObject, NEContactListener { func setAddApplicationRead(_ completion: ((Bool, NSError?) -> Void)?) { NEALog.infoLog(ModuleName + " " + className(), desc: #function) contactRepo.setAddApplicationRead { success, error in - completion?(success, error as? NSError) + completion?(success, error) DispatchQueue.main.async { NotificationCenter.default.post(name: NENotificationName.clearValidationUnreadCount, object: nil) } diff --git a/NEConversationUIKit/NEConversationUIKit.podspec b/NEConversationUIKit/NEConversationUIKit.podspec index eda380af..a1c172de 100644 --- a/NEConversationUIKit/NEConversationUIKit.podspec +++ b/NEConversationUIKit/NEConversationUIKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEConversationUIKit' - s.version = '10.4.0' + s.version = '10.4.1' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/NEMapKit/NEMapKit.podspec b/NEMapKit/NEMapKit.podspec index e7894e2b..61645e7f 100644 --- a/NEMapKit/NEMapKit.podspec +++ b/NEMapKit/NEMapKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NEMapKit' - s.version = '10.4.0' + s.version = '10.4.1' 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 d6ed6fb5..dfb99a4d 100644 --- a/NETeamUIKit/NETeamUIKit.podspec +++ b/NETeamUIKit/NETeamUIKit.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'NETeamUIKit' - s.version = '10.4.0' + s.version = '10.4.1' s.summary = 'Netease XKit' # This description is used to generate tags and improve search results. diff --git a/Podfile b/Podfile index d8278c92..5e61dc58 100644 --- a/Podfile +++ b/Podfile @@ -7,17 +7,17 @@ target 'app' do use_frameworks! # 基础库 -# pod 'NIMSDK_LITE','10.4.0-beta' - pod 'NEChatKit', '10.4.0' +# pod 'NIMSDK_LITE','10.5.0' + pod 'NEChatKit', '10.4.1' # UI 组件,依次为通讯录组件、会话列表组件、会话(聊天)组件、群相关设置组件 - pod 'NEChatUIKit', '10.4.0' - pod 'NEContactUIKit', '10.4.0' - pod 'NEConversationUIKit', '10.4.0' - pod 'NETeamUIKit', '10.4.0' + pod 'NEChatUIKit', '10.4.1' + pod 'NEContactUIKit', '10.4.1' + pod 'NEConversationUIKit', '10.4.1' + pod 'NETeamUIKit', '10.4.1' # 扩展库 - 地理位置组件 - pod 'NEMapKit', '10.4.0' + pod 'NEMapKit', '10.4.1' # 扩展库 - AI 划词搜索 pod 'NEAISearchKit', '1.0.3'