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