Skip to content

Commit

Permalink
v10.4.1 (#408)
Browse files Browse the repository at this point in the history
* add sample code

* update Podfile

* v10.4.0

* v10.4.1

---------

Co-authored-by: 张诗文 <[email protected]>
  • Loading branch information
zsw666 and 张诗文 authored Nov 5, 2024
1 parent 4872910 commit 074aadb
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 67 deletions.
4 changes: 2 additions & 2 deletions NEAISearchKit/NEAISearchKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion NEChatUIKit/NEChatUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion NEContactUIKit/NEContactUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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)
}
}
}
Expand Down Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion NEConversationUIKit/NEConversationUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion NEMapKit/NEMapKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion NETeamUIKit/NETeamUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 074aadb

Please sign in to comment.