feat(gift): 선물 화면 경로를 등록한다
This commit is contained in:
@@ -139,8 +139,17 @@ class AppState: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
func replaceCurrentAppStep(step: AppStep) {
|
||||
func replaceCurrentAppStep(
|
||||
step: AppStep,
|
||||
ifCurrentStep matches: ((AppStep) -> Bool)? = nil,
|
||||
completion: @escaping (Bool) -> Void = { _ in }
|
||||
) {
|
||||
DispatchQueue.main.async {
|
||||
guard matches?(self.appStep) ?? true else {
|
||||
completion(false)
|
||||
return
|
||||
}
|
||||
|
||||
if let route = self.navigationPath.popLast() {
|
||||
self.routeStepMap.removeValue(forKey: route)
|
||||
}
|
||||
@@ -149,6 +158,7 @@ class AppState: ObservableObject {
|
||||
self.routeStepMap[route] = step
|
||||
self.navigationPath.append(route)
|
||||
self.appStep = step
|
||||
completion(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -196,4 +196,12 @@ enum AppStep {
|
||||
case contentOverview(type: ContentOverviewType = .newAndHotAudio)
|
||||
|
||||
case seriesMain
|
||||
|
||||
case giftSend(recipientMemberId: Int, recipientCreatorNickname: String)
|
||||
|
||||
case giftBoxList
|
||||
|
||||
case giftDetail(applicationNo: String)
|
||||
|
||||
case giftTrackingRegistration(applicationNo: String)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user