Last active
December 22, 2021 03:19
-
-
Save hanfengs/ddbba34ed843454c842212b4c6745132 to your computer and use it in GitHub Desktop.
[swift推送的处理] #swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------- | |
// push receive 情况 | |
if topVC is LiveShowDetailController && LiveShowService.shared.currentChannel?.host.id == AuthAccount.current?.id{ | |
canDisplay = false | |
} | |
if topVC is MainTabViewController { | |
if let child = UIApplication.getChildViewController(parent: topVC), child is LiveShowDetailController { | |
if LiveShowService.shared.currentChannel?.id == info.roomId { | |
canDisplay = false | |
} | |
} | |
} | |
if topVC is LiveShowDetailController && LiveShowService.shared.currentChannel?.id == info.roomId { | |
canDisplay = false | |
} | |
---------------------------------------------- | |
// push click 情况 | |
if LiveShowService.shared.currentChannel?.host.id == AuthAccount.current?.id || LiveShowService.shared.currentChannel?.id == info.roomId { | |
return | |
} | |
if let topVC = UIApplication.getTopViewController(), topVC is MainTabViewController { | |
if let child = UIApplication.getChildViewController(parent: topVC), child is LiveShowDetailController { | |
let liveShowDetail = child as! LiveShowDetailController | |
liveShowDetail.dismissLiveShowClick() | |
return | |
} | |
} | |
if let topVC = UIApplication.getTopViewController(), topVC is LiveShowDetailController { | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment