푸시 터치 액션 수정
This commit is contained in:
@@ -13,6 +13,8 @@ struct SplashView: View {
|
||||
@State private var isShowForcedUpdatePopup = false
|
||||
@State private var isShowUpdatePopup = false
|
||||
|
||||
@StateObject var liveViewModel = LiveViewModel()
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .top) {
|
||||
LinearGradient(
|
||||
@@ -54,9 +56,17 @@ struct SplashView: View {
|
||||
checkAppVersion(latestVersion: remoteConfig["ios_latest_version"].stringValue)
|
||||
}
|
||||
} else {
|
||||
withAnimation {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) {
|
||||
withAnimation {
|
||||
if AppState.shared.pushRoomId > 0 {
|
||||
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
||||
} else if AppState.shared.pushChannelId > 0 {
|
||||
AppState.shared.setAppStep(step: .creatorDetail(userId: AppState.shared.pushChannelId))
|
||||
} else if AppState.shared.pushAudioContentId > 0 {
|
||||
AppState.shared.setAppStep(step: .contentDetail(contentId: AppState.shared.pushAudioContentId))
|
||||
} else {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,14 +95,30 @@ struct SplashView: View {
|
||||
} else {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
withAnimation {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
if AppState.shared.pushRoomId > 0 {
|
||||
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
||||
} else if AppState.shared.pushChannelId > 0 {
|
||||
AppState.shared.setAppStep(step: .creatorDetail(userId: AppState.shared.pushChannelId))
|
||||
} else if AppState.shared.pushAudioContentId > 0 {
|
||||
AppState.shared.setAppStep(step: .contentDetail(contentId: AppState.shared.pushAudioContentId))
|
||||
} else {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
withAnimation {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
if AppState.shared.pushRoomId > 0 {
|
||||
liveViewModel.enterLiveRoom(roomId: AppState.shared.pushRoomId)
|
||||
} else if AppState.shared.pushChannelId > 0 {
|
||||
AppState.shared.setAppStep(step: .creatorDetail(userId: AppState.shared.pushChannelId))
|
||||
} else if AppState.shared.pushAudioContentId > 0 {
|
||||
AppState.shared.setAppStep(step: .contentDetail(contentId: AppState.shared.pushAudioContentId))
|
||||
} else {
|
||||
AppState.shared.setAppStep(step: .main)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user