점검중 플래그, 팝업 추가
This commit is contained in:
parent
c1a4c534e1
commit
d2d44d5e9d
|
@ -11,6 +11,7 @@ import FirebaseRemoteConfig
|
|||
struct SplashView: View {
|
||||
@State private var isShowForcedUpdatePopup = false
|
||||
@State private var isShowUpdatePopup = false
|
||||
@State private var isShowMaintenancePopup = false
|
||||
|
||||
@StateObject var liveViewModel = LiveViewModel()
|
||||
|
||||
|
@ -31,6 +32,15 @@ struct SplashView: View {
|
|||
.padding(.bottom, screenSize().height * 240 / 2337)
|
||||
}
|
||||
|
||||
if isShowMaintenancePopup {
|
||||
SodaDialog(
|
||||
title: "안내",
|
||||
desc: "서비스 점검중입니다.",
|
||||
confirmButtonTitle: "확인",
|
||||
confirmButtonAction: { isShowMaintenancePopup = false }
|
||||
)
|
||||
}
|
||||
|
||||
if isShowUpdatePopup {
|
||||
SodaDialog(
|
||||
title: "업데이트",
|
||||
|
@ -76,7 +86,12 @@ struct SplashView: View {
|
|||
remoteConfig.fetch { status, error in
|
||||
if status == .success {
|
||||
remoteConfig.activate { changed, error in
|
||||
checkAppVersion(latestVersion: remoteConfig["ios_latest_version"].stringValue)
|
||||
let isMaintenance = remoteConfig["is_maintenance"].boolValue
|
||||
if isMaintenance {
|
||||
isShowMaintenancePopup = true
|
||||
} else {
|
||||
checkAppVersion(latestVersion: remoteConfig["ios_latest_version"].stringValue)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
||||
|
|
Loading…
Reference in New Issue