Commit 23abd9fc authored by Alex朱枝文's avatar Alex朱枝文

解决切换账号导致消息列表银河管家消息不及时更新bug

parent 5dcb4951
...@@ -59,7 +59,9 @@ class YHButlerServiceManager: NSObject { ...@@ -59,7 +59,9 @@ class YHButlerServiceManager: NSObject {
guard isUatAllowed() else { guard isUatAllowed() else {
return return
} }
initSDKAccountAndLastMessage() initSDKAccountAndLastMessage { _ in
//
}
} }
func updateApnsToken(token: Data) { func updateApnsToken(token: Data) {
...@@ -132,8 +134,9 @@ extension YHButlerServiceManager { ...@@ -132,8 +134,9 @@ extension YHButlerServiceManager {
} }
/// 初始化SDK用户信息 /// 初始化SDK用户信息
func initSDKAccountAndLastMessage() { func initSDKAccountAndLastMessage(completion: @escaping (Bool) -> Void) {
updateSDKAccountInfo(completion: { _ in updateSDKAccountInfo(completion: { flag in
completion(flag)
}) })
} }
...@@ -153,14 +156,20 @@ extension YHButlerServiceManager { ...@@ -153,14 +156,20 @@ extension YHButlerServiceManager {
guard isUatAllowed() else { guard isUatAllowed() else {
return return
} }
initSDKAccountAndLastMessage() initSDKAccountAndLastMessage { _ in
// 为了更新状态
NotificationCenter.default.post(name: YhConstant.YhNotification.didQiYuUnReadMsgCountChangeNotification, object: nil)
}
} }
@objc private func loginSuccess() { @objc private func loginSuccess() {
guard isUatAllowed() else { guard isUatAllowed() else {
return return
} }
initSDKAccountAndLastMessage() initSDKAccountAndLastMessage { _ in
// 为了更新状态
NotificationCenter.default.post(name: YhConstant.YhNotification.didQiYuUnReadMsgCountChangeNotification, object: nil)
}
} }
@objc private func logoutSuccess() { @objc private func logoutSuccess() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment