Commit bda886c0 authored by David黄金龙's avatar David黄金龙

处理 首页推送刷新的问题

parent 39fa65c2
......@@ -3744,7 +3744,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyTestEnv.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -3948,7 +3948,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxyDebug.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......@@ -3994,7 +3994,7 @@
CODE_SIGN_ENTITLEMENTS = galaxy/galaxy.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
FRAMEWORK_SEARCH_PATHS = (
......
......@@ -121,6 +121,9 @@ extension AppDelegate: JPUSHRegisterDelegate {
// 转换到消息tab
YHLoginManager.shared.needJumpToMsgTabFlag = true
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25, execute: {
NotificationCenter.default.post(name: YhConstant.YhNotification.didRevMsgNotifiction, object: nil)
goToMessagePage()
})
}
......
......@@ -322,8 +322,14 @@ private extension YHHomePageViewController {
view.backgroundColor = .white
NotificationCenter.default.addObserver(self, selector: #selector(loginSuccess), name: YhConstant.YhNotification.didLoginSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(logoutSuccess), name: YhConstant.YhNotification.didLogoutSuccessNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(getTotalUnreadMsgCount), name: YhConstant.YhNotification.didRequestUnreadMsgTotalCountNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(revMsg), name: YhConstant.YhNotification.didRevMsgNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(clearUnreadBadge), name: YhConstant.YhNotification.didMarkAllMessagesReadedNotifiction, object: nil)
view.addSubview(searchView)
......@@ -379,6 +385,10 @@ private extension YHHomePageViewController {
self.msgUnreadView.unreadCount = 0
getData()
}
@objc func revMsg() {
requestOrder()
}
}
extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource {
......@@ -511,7 +521,7 @@ extension YHHomePageViewController {
}
// self.needReloadDataFlag = true
requestOrder()
// requestOrder()
self.msgViewModel.requestTotalUnreadMsgCount {
[weak self] success, error in
......
......@@ -254,9 +254,11 @@ extension YhConstant {
// 跳转 社区的人脉页
public static let goConnectionVCNotifiction = Notification.Name(rawValue: "com.yinhe.goConnectionVCNotifiction")
// 点击了 首页的消息
public static let clickHomeMsgNotifiction = Notification.Name(rawValue: "com.yinhe.clickHomeMsgNotifiction")
//接收到消息推送
public static let didRevMsgNotifiction = Notification.Name(rawValue: "com.yinhe.didRevMsgNotifiction")
}
}
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