Skip to content

Commit 2a6ce13

Browse files
author
徐善栋
committed
对齐壳子文件
1 parent 4f2b10a commit 2a6ce13

6 files changed

Lines changed: 17 additions & 16 deletions

app/AppDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
3131
let option = NIMSDKOption()
3232
option.appKey = AppKey.appKey
3333
option.apnsCername = AppKey.pushCerName
34-
CoreKitEngine.instance.setupCoreKit(option)
34+
IMKitEngine.instance.setupCoreKitIM(option)
3535

3636

3737
IQKeyboardManager.shared.enable = true
3838
IQKeyboardManager.shared.shouldResignOnTouchOutside = true
3939

4040
//login action
41-
startLogin(account: <#imaccid#>, token: <#imToken#>)
41+
startLogin(account:"279476370047232", token:"22b4fb5a-9696-4ce6-95b5-39be56bf5980")
4242
}
4343

4444
@objc func refreshRoot(){
@@ -80,13 +80,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
8080

8181
func startLogin(account:String,token:String){
8282
weak var weakSelf = self
83-
CoreKitEngine.instance.login(account, token) { error in
83+
IMKitLoginManager.instance.loginIM(account, token) { error in
8484
if let err = error {
8585
print("NEKitCore login error : ", err)
8686
}else {
8787
ChatRouter.setupInit()
8888
let param = QChatLoginParam(account,token)
89-
CoreKitIMEngine.instance.loginQchat(param) { error, response in
89+
IMKitLoginManager.instance.loginQchat(param) { error, response in
9090
if let err = error {
9191
print("qchatLogin failed, error : ", err)
9292
}else {

app/Mine/MeViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class MeViewController: UIViewController {
127127
}
128128

129129
func updateUserInfo(){
130-
let user = userProvider.getUserInfo(userId: CoreKitIMEngine.instance.imAccid)
130+
let user = userProvider.getUserInfo(userId: IMKitLoginManager.instance.imAccid)
131131
idLabel.text = "账号:\(user?.userId ?? "")"
132132
nameLabel.text = user?.userInfo?.nickName
133133
header.configHeadData(headUrl: user?.userInfo?.avatarUrl, name: user?.showName() ?? "")

app/Mine/MineSettingViewModel.swift

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ public class MineSettingViewModel {
5757
receiverModel.cellName = "听筒模式"
5858
receiverModel.type = SettingCellType.SettingSwitchCell.rawValue
5959
receiverModel.cornerType = .topLeft.union(.topRight)
60-
receiverModel.switchOpen = CoreKitEngine.instance.repo.getHandSetMode()
61-
60+
// receiverModel.switchOpen = CoreKitEngine.instance.repo.getHandSetMode()
61+
receiverModel.switchOpen = IMKitEngine.instance.repo.getHandSetMode()
62+
6263
receiverModel.swichChange = { isOpen in
63-
CoreKitEngine.instance.repo.setHandSetMode(isOpen)
64+
IMKitEngine.instance.repo.setHandSetMode(isOpen)
6465
}
6566
// //过滤通知
6667
// let filterNotify = SettingCellModel()
@@ -76,10 +77,10 @@ public class MineSettingViewModel {
7677
let deleteFriend = SettingCellModel()
7778
deleteFriend.cellName = "删除好友是否同步删除备注"
7879
deleteFriend.type = SettingCellType.SettingSwitchCell.rawValue
79-
deleteFriend.switchOpen = CoreKitEngine.instance.repo.getDeleteFriendAlias()
80+
deleteFriend.switchOpen = IMKitEngine.instance.repo.getDeleteFriendAlias()
8081

8182
deleteFriend.swichChange = { isOpen in
82-
CoreKitEngine.instance.repo.setDeleteFriendAlias(isOpen)
83+
IMKitEngine.instance.repo.setDeleteFriendAlias(isOpen)
8384
}
8485

8586
//消息已读未读功能
@@ -88,9 +89,9 @@ public class MineSettingViewModel {
8889
hasRead.type = SettingCellType.SettingSwitchCell.rawValue
8990
hasRead.cornerType = .bottomLeft.union(.bottomRight)
9091
// hasRead.switchOpen = true
91-
hasRead.switchOpen = CoreKitEngine.instance.repo.getMessageRead()
92+
hasRead.switchOpen = IMKitEngine.instance.repo.getMessageRead()
9293
hasRead.swichChange = { isOpen in
93-
CoreKitEngine.instance.repo.setMessageRead(isOpen)
94+
IMKitEngine.instance.repo.setMessageRead(isOpen)
9495
}
9596
model.cellModels.append(contentsOf: [receiverModel ,deleteFriend,hasRead])
9697
return model

app/Mine/PersonInfoViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class PersonInfoViewController: NEBaseViewController {
128128
extension PersonInfoViewController:NIMUserManagerDelegate {
129129

130130
func onUserInfoChanged(_ user: NIMUser) {
131-
if user.userId == CoreKitIMEngine.instance.imAccid {
131+
if user.userId == IMKitLoginManager.instance.imAccid {
132132
viewModel.getData()
133133
tableView.reloadData()
134134
}
@@ -150,7 +150,7 @@ extension PersonInfoViewController:UINavigationControllerDelegate {
150150
self.view.makeToastActivity(.center)
151151
weak var weakSelf = self
152152
if let imageData = image.jpegData(compressionQuality: 0.6) as NSData? {
153-
let filePath = NSHomeDirectory().appending("/Documents/").appending(CoreKitIMEngine.instance.imAccid)
153+
let filePath = NSHomeDirectory().appending("/Documents/").appending(IMKitLoginManager.instance.imAccid)
154154
let succcess = imageData.write(toFile: filePath, atomically: true)
155155
if succcess {
156156
NIMSDK.shared().resourceManager.upload(filePath, scene: NIMNOSSceneTypeAvatar, progress: nil) { urlString, error in

app/Mine/PersonInfoViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class PersonInfoViewModel{
2626

2727
func getData(){
2828
sectionData.removeAll()
29-
userInfo = friendProvider.getUserInfo(userId: CoreKitIMEngine.instance.imAccid)
29+
userInfo = friendProvider.getUserInfo(userId: IMKitLoginManager.instance.imAccid)
3030
sectionData.append(getFirstSection())
3131
sectionData.append(getSecondSection())
3232
}

app/NETabBarController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class NETabBarController: UITabBarController {
6161
}
6262

6363
func setUpSessionBadgeValue(){
64-
sessionUnreadCount = ConversationRepo().allUnreadCount(notify: true)
64+
sessionUnreadCount = ConversationRepo().getMsgUnreadCount(notify: true)
6565
if sessionUnreadCount > 0 {
6666
self.tabBar.showBadgOn(index: 0)
6767
}else {

0 commit comments

Comments
 (0)