푸시, 딥링크 - 라이브 탭으로 이동하지 않아도 실행되도록 수정

This commit is contained in:
Yu Sung
2023-09-01 00:35:50 +09:00
parent d76b1c7a59
commit a41c423991
5 changed files with 75 additions and 41 deletions

View File

@@ -141,44 +141,6 @@ struct LiveView: View {
}
}
}
.valueChanged(value: appState.pushRoomId) { value in
DispatchQueue.main.async {
appState.setAppStep(step: .main)
if value > 0 {
viewModel.enterRoom(roomId: value)
}
}
}
.valueChanged(value: appState.pushChannelId) { value in
DispatchQueue.main.async {
appState.setAppStep(step: .main)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
if value > 0 {
appState.setAppStep(step: .creatorDetail(userId: value))
}
}
}
}
.valueChanged(value: appState.pushAudioContentId) { value in
appState.setAppStep(step: .main)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
if value > 0 {
appState.setAppStep(step: .contentDetail(contentId: value))
}
}
}
.onAppear {
if appState.pushRoomId > 0 {
viewModel.enterRoom(roomId: appState.pushRoomId)
} else if appState.pushChannelId > 0 {
appState.setAppStep(step: .creatorDetail(userId: appState.pushChannelId))
} else if appState.pushAudioContentId > 0 {
appState.setAppStep(step: .contentDetail(contentId: appState.pushAudioContentId))
}
}
}
private func onCreateSuccess(response: CreateLiveRoomResponse) {