Skip to content

Commit 074aadb

Browse files
zsw666张诗文
andauthored
v10.4.1 (#408)
* add sample code * update Podfile * v10.4.0 * v10.4.1 --------- Co-authored-by: 张诗文 <zhangshiwen@corp.netease.com>
1 parent 4872910 commit 074aadb

9 files changed

Lines changed: 26 additions & 67 deletions

File tree

NEAISearchKit/NEAISearchKit.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'NEAISearchKit'
11-
s.version = '1.0.0'
11+
s.version = '1.0.3'
1212
s.summary = 'Netease XKit'
1313

1414
# This description is used to generate tags and improve search results.
@@ -38,7 +38,7 @@ TODO: Add long description of the pod here.
3838
s.resource = 'NEAISearchKit/Assets/**/*'
3939

4040
s.dependency 'NEChatKit'
41-
s.dependency 'NECommonUIKit', '9.7.0'
41+
s.dependency 'NECommonUIKit', '9.7.3'
4242
s.dependency 'lottie-ios','4.4.0'
4343

4444
end

NEChatUIKit/NEChatUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = 'NEChatUIKit'
19-
s.version = '10.4.0'
19+
s.version = '10.4.1'
2020
s.summary = 'Chat Module of IM.'
2121

2222
# This description is used to generate tags and improve search results.

NEContactUIKit/NEContactUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'NEContactUIKit'
11-
s.version = '10.4.0'
11+
s.version = '10.4.1'
1212
s.summary = 'Netease XKit'
1313

1414
# This description is used to generate tags and improve search results.

NEContactUIKit/NEContactUIKit/Classes/Validation/Controller/NEBaseValidationMessageViewController.swift

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -70,66 +70,21 @@ open class NEBaseValidationMessageViewController: NEContactBaseViewController {
7070
tableView.sectionHeaderTopPadding = 0.0
7171
}
7272

73-
tableView.mj_header = MJRefreshNormalHeader(
74-
refreshingTarget: self,
75-
refreshingAction: #selector(loadData)
76-
)
7773
return tableView
7874
}()
7975

80-
/// 表格添加底部 loading
81-
func addBottomLoadMore() {
82-
let footer = MJRefreshAutoFooter(
83-
refreshingTarget: self,
84-
refreshingAction: #selector(loadMoreData)
85-
)
86-
footer.triggerAutomaticallyRefreshPercent = -10
87-
tableView.mj_footer = footer
88-
}
89-
90-
/// 表格移除底部 loading
91-
func removeBottomLoadMore() {
92-
tableView.mj_footer?.endRefreshingWithNoMoreData()
93-
tableView.mj_footer = nil
94-
}
95-
9676
/// 加载数据
9777
func loadData() {
9878
viewModel.loadApplicationList(true) { [weak self] finished, error in
9979
if let err = error {
10080
NEALog.errorLog(ModuleName + " " + NEBaseValidationMessageViewController.className(), desc: "loadApplicationList CALLBACK error: \(err.localizedDescription)")
10181
} else {
102-
if finished {
103-
self?.removeBottomLoadMore()
104-
} else {
105-
self?.addBottomLoadMore()
106-
}
107-
108-
self?.tableView.mj_header?.endRefreshing()
10982
self?.emptyView.isHidden = (self?.viewModel.datas.count ?? 0) > 0
11083
self?.tableView.reloadData()
11184
}
11285
}
11386
}
11487

115-
/// 加载更多
116-
func loadMoreData() {
117-
viewModel.loadApplicationList(false) { [weak self] finished, error in
118-
if let err = error {
119-
NEALog.errorLog(ModuleName + " " + NEBaseValidationMessageViewController.className(), desc: "loadMoreApplicationList CALLBACK error: \(err.localizedDescription)")
120-
} else {
121-
if finished {
122-
self?.removeBottomLoadMore()
123-
} else {
124-
self?.addBottomLoadMore()
125-
}
126-
127-
self?.tableView.mj_footer?.endRefreshing()
128-
self?.tableView.reloadData()
129-
}
130-
}
131-
}
132-
13388
func initNav() {
13489
let clearItem = UIBarButtonItem(
13590
title: localizable("clear"),
@@ -205,13 +160,8 @@ extension NEBaseValidationMessageViewController: SystemNotificationCellDelegate
205160
/// - notifiModel: 申请模型
206161
/// - notiStatus: 处理状态
207162
public func changeValidationStatus(notifiModel: NENotification, notiStatus: NEHandleStatus) {
208-
notifiModel.handleStatus = notiStatus
209-
notifiModel.unReadCount = 0
210-
for msg in notifiModel.msgList ?? [] {
211-
msg.handleStatus = notiStatus
212-
}
213-
214163
DispatchQueue.main.async {
164+
self.loadData()
215165
self.tableView.reloadData()
216166
}
217167
}

NEContactUIKit/NEContactUIKit/Classes/Validation/ViewModel/ValidationMessageViewModel.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ open class ValidationMessageViewModel: NSObject, NEContactListener {
1313
var datas = [NENotification]()
1414
var dataRefresh: (() -> Void)?
1515
var offset: UInt = 0 // 查询的偏移量
16+
var finished: Bool = false // 是否还有数据
1617
var pageMaxLimit: UInt = 100 // 查询的每页数量
1718

1819
override init() {
@@ -32,14 +33,22 @@ open class ValidationMessageViewModel: NSObject, NEContactListener {
3233

3334
let offset = firstLoad ? 0 : offset
3435
if firstLoad {
36+
finished = false
3537
datas.removeAll()
3638
}
39+
40+
if finished {
41+
completin(true, nil)
42+
return
43+
}
44+
3745
getValidationMessage(offset) { [weak self] offset, finished, error in
3846
if let err = error {
3947
completin(finished, err)
4048
} else {
4149
self?.offset = offset
42-
completin(finished, nil)
50+
self?.finished = finished
51+
self?.loadApplicationList(false, completin)
4352
}
4453
}
4554
}
@@ -140,7 +149,7 @@ open class ValidationMessageViewModel: NSObject, NEContactListener {
140149
func setAddApplicationRead(_ completion: ((Bool, NSError?) -> Void)?) {
141150
NEALog.infoLog(ModuleName + " " + className(), desc: #function)
142151
contactRepo.setAddApplicationRead { success, error in
143-
completion?(success, error as? NSError)
152+
completion?(success, error)
144153
DispatchQueue.main.async {
145154
NotificationCenter.default.post(name: NENotificationName.clearValidationUnreadCount, object: nil)
146155
}

NEConversationUIKit/NEConversationUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'NEConversationUIKit'
11-
s.version = '10.4.0'
11+
s.version = '10.4.1'
1212
s.summary = 'Netease XKit'
1313

1414
# This description is used to generate tags and improve search results.

NEMapKit/NEMapKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'NEMapKit'
11-
s.version = '10.4.0'
11+
s.version = '10.4.1'
1212
s.summary = 'Netease XKit'
1313

1414
# This description is used to generate tags and improve search results.

NETeamUIKit/NETeamUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'NETeamUIKit'
11-
s.version = '10.4.0'
11+
s.version = '10.4.1'
1212
s.summary = 'Netease XKit'
1313

1414
# This description is used to generate tags and improve search results.

Podfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ target 'app' do
77
use_frameworks!
88

99
# 基础库
10-
# pod 'NIMSDK_LITE','10.4.0-beta'
11-
pod 'NEChatKit', '10.4.0'
10+
# pod 'NIMSDK_LITE','10.5.0'
11+
pod 'NEChatKit', '10.4.1'
1212

1313
# UI 组件,依次为通讯录组件、会话列表组件、会话(聊天)组件、群相关设置组件
14-
pod 'NEChatUIKit', '10.4.0'
15-
pod 'NEContactUIKit', '10.4.0'
16-
pod 'NEConversationUIKit', '10.4.0'
17-
pod 'NETeamUIKit', '10.4.0'
14+
pod 'NEChatUIKit', '10.4.1'
15+
pod 'NEContactUIKit', '10.4.1'
16+
pod 'NEConversationUIKit', '10.4.1'
17+
pod 'NETeamUIKit', '10.4.1'
1818

1919
# 扩展库 - 地理位置组件
20-
pod 'NEMapKit', '10.4.0'
20+
pod 'NEMapKit', '10.4.1'
2121

2222
# 扩展库 - AI 划词搜索
2323
pod 'NEAISearchKit', '1.0.3'

0 commit comments

Comments
 (0)