오디션 생성 푸시를 받으면 오디션 탭으로 이동하도록 수정

This commit is contained in:
Yu Sung
2025-01-09 00:38:29 +09:00
parent b5b53f95c7
commit 7481637fbb
3 changed files with 25 additions and 1 deletions

View File

@@ -24,7 +24,20 @@ final class HomeViewModel: ObservableObject {
case content, live, audition, message, mypage
}
@Published var currentTab: CurrentTab = .content
@Published var currentTab: CurrentTab = AppState.shared.startTab
init() {
NotificationCenter.default
.publisher(for: .didReceiveHomeTab)
.compactMap {
$0.object as? CurrentTab
}
.sink { [weak self] currentTab in
AppState.shared.setAppStep(step: .main)
self?.currentTab = currentTab
}
.store(in: &subscription)
}
func pushTokenUpdate(pushToken: String) {
userRepository.updatePushToken(pushToken: pushToken)