인증 완료 후 동작 실행
This commit is contained in:
@@ -14,6 +14,8 @@ struct ChatTabView: View {
|
||||
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
||||
@AppStorage("auth") private var auth: Bool = UserDefaults.bool(forKey: UserDefaultsKey.auth)
|
||||
|
||||
@StateObject var mypageViewModel = MyPageViewModel()
|
||||
|
||||
private enum InnerTab: Int, CaseIterable {
|
||||
case character = 0
|
||||
case original = 1
|
||||
@@ -153,12 +155,15 @@ struct ChatTabView: View {
|
||||
AppState.shared.isShowErrorPopup = true
|
||||
isShowAuthView = false
|
||||
}
|
||||
.onDone { _ in
|
||||
auth = true
|
||||
isShowAuthView = false
|
||||
if let action = pendingAction {
|
||||
pendingAction = nil
|
||||
action()
|
||||
.onDone {
|
||||
DEBUG_LOG("onDone: \($0)")
|
||||
mypageViewModel.authVerify($0) {
|
||||
auth = true
|
||||
isShowAuthView = false
|
||||
if let action = pendingAction {
|
||||
pendingAction = nil
|
||||
action()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onClose {
|
||||
|
||||
Reference in New Issue
Block a user