From 7c8f9b1460f574410294eb29e2fccef183feb0fe Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 3 Nov 2023 20:37:47 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EA=B5=AC?= =?UTF-8?q?=EB=A7=A4=20-=20=EC=BA=94=EC=9D=B4=20=EB=B6=80=EC=A1=B1?= =?UTF-8?q?=ED=95=98=EB=A9=B4=20=EC=BA=94=20=EC=B6=A9=EC=A0=84=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/Content/Detail/ContentDetailViewModel.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SodaLive/Sources/Content/Detail/ContentDetailViewModel.swift b/SodaLive/Sources/Content/Detail/ContentDetailViewModel.swift index dbcc720..4a48764 100644 --- a/SodaLive/Sources/Content/Detail/ContentDetailViewModel.swift +++ b/SodaLive/Sources/Content/Detail/ContentDetailViewModel.swift @@ -305,6 +305,11 @@ final class ContentDetailViewModel: ObservableObject { } else { if let message = decoded.message { self.errorMessage = message + if message.contains("캔이 부족합니다") { + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + AppState.shared.setAppStep(step: .canCharge(refresh: {}, afterCompletionToGoBack: true)) + } + } } else { self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다." }