오디션 생성 푸시를 받으면 오디션 탭으로 이동하도록 수정
This commit is contained in:
@@ -97,6 +97,7 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
|
||||
let contentIdString = userInfo["content_id"] as? String
|
||||
let channelIdString = userInfo["channel_id"] as? String
|
||||
let messageIdString = userInfo["message_id"] as? String
|
||||
let auditionIdString = userInfo["audition_id"] as? String
|
||||
|
||||
if let roomIdString = roomIdString, let roomId = Int(roomIdString), roomId > 0 {
|
||||
AppState.shared.pushRoomId = roomId
|
||||
@@ -114,6 +115,15 @@ extension AppDelegate : UNUserNotificationCenterDelegate {
|
||||
AppState.shared.pushMessageId = messageId
|
||||
}
|
||||
|
||||
if let auditionIdString = auditionIdString, let auditionId = Int(auditionIdString), auditionId > 0 {
|
||||
AppState.shared.startTab = .audition
|
||||
NotificationCenter.default.post(name: .didReceiveHomeTab, object: HomeViewModel.CurrentTab.audition)
|
||||
}
|
||||
|
||||
completionHandler()
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static let didReceiveHomeTab = Notification.Name("didReceiveHomeTab")
|
||||
}
|
||||
|
@@ -42,6 +42,7 @@ class AppState: ObservableObject {
|
||||
@Published var purchasedContentOrderType = OrderType.KEEP
|
||||
|
||||
@Published var isChangeAdultContentVisible = false
|
||||
@Published var startTab: HomeViewModel.CurrentTab = .content
|
||||
|
||||
func setAppStep(step: AppStep) {
|
||||
switch step {
|
||||
|
Reference in New Issue
Block a user