Commit 82893b8d authored by DavidHuang's avatar DavidHuang

修改一处 bug

parent 8f36a770
...@@ -84,7 +84,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -84,7 +84,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
if let type = arrItems["type"] as? String,let iType = Int(type) { if let type = arrItems["type"] as? String,let iType = Int(type) {
if iType == 1 { if iType == 1 {
//跳转 //跳转
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if !YHLoginManager.shared.isLogin() { if !YHLoginManager.shared.isLogin() {
printLog("需要登录") printLog("需要登录")
return return
......
...@@ -366,6 +366,9 @@ class YHPlayerManager: NSObject { ...@@ -366,6 +366,9 @@ class YHPlayerManager: NSObject {
} }
func enterLive(from sourceView: UIView?, playbackInfo: PlaybackInfo) { func enterLive(from sourceView: UIView?, playbackInfo: PlaybackInfo) {
NotificationCenter.default.post(name: YhConstant.YhNotification.closeShareUIInLiveRoomNotifiction, object: nil)
let playerType = determinePlayerType(for: .fullscreen) let playerType = determinePlayerType(for: .fullscreen)
var updatedInfo = playbackInfo var updatedInfo = playbackInfo
updatedInfo.scene = .fullscreen updatedInfo.scene = .fullscreen
......
...@@ -76,7 +76,15 @@ class YHShareAlertView: UIView { ...@@ -76,7 +76,15 @@ class YHShareAlertView: UIView {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
deinit {
NotificationCenter.default.removeObserver(self)
}
func setView() { func setView() {
NotificationCenter.default.addObserver(self, selector: #selector(dismiss), name: YhConstant.YhNotification.closeShareUIInLiveRoomNotifiction, object: nil)
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5) backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = { centerView = {
let view = UIView() let view = UIView()
......
...@@ -402,5 +402,8 @@ extension YhConstant { ...@@ -402,5 +402,8 @@ extension YhConstant {
public static let backToHomeNotification = Notification.Name(rawValue: "com.yinhe.backToHomeNotification") public static let backToHomeNotification = Notification.Name(rawValue: "com.yinhe.backToHomeNotification")
// 切换到AI对话tab // 切换到AI对话tab
public static let didSwitchToAIChatNotification = Notification.Name(rawValue: "com.yinhe.switchToAIChat") public static let didSwitchToAIChatNotification = Notification.Name(rawValue: "com.yinhe.switchToAIChat")
//关闭直播间弹出的分享界面
public static let closeShareUIInLiveRoomNotifiction = Notification.Name(rawValue: "com.yinhe.app.close.share.ui")
} }
} }
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