Commit aa2a29eb authored by Olev Abel's avatar Olev Abel
Browse files

COVAPP-478: Fix close contact always turned off false state

parent 23a65d60
......@@ -1503,7 +1503,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Release.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = TEST_EE_1;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -1613,7 +1613,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Release.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = EE;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -1721,7 +1721,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Debug.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = TEST_EE_1;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -1830,7 +1830,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Debug.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = EE;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -1941,7 +1941,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Release.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = EE;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -2054,7 +2054,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Release.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = EE;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -2165,7 +2165,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Release.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = EE;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......@@ -2272,7 +2272,7 @@
CODE_SIGN_ENTITLEMENTS = "Hoia/Supporting Files/Release.entitlements";
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 13;
DEVELOPMENT_TEAM = ANUWA6D3YG;
EXP_NOT_DEV_REGION = EE;
INFOPLIST_FILE = "Hoia/Supporting Files/Info.plist";
......
......@@ -25,6 +25,9 @@ final class HomeView: BlueHeaderBaseView {
}
private func setup() {
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
appStatusView.isHidden = true
myDataView.updateState(
style: .arrowNormal,
title: Strings.myData,
......
......@@ -5,6 +5,9 @@ final class HomeViewController: UIViewController {
private var homeView: HomeView! { view as? HomeView }
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
private var isSDKDelayElapsed = false
init(viewModel: HomeViewModel) {
self.viewModel = viewModel
super.init(nibName: nil, bundle: nil)
......@@ -36,6 +39,9 @@ final class HomeViewController: UIViewController {
navigationController?.navigationBar.tintColor = .white
navigationController?.navigationBar.barStyle = .black
setNeedsStatusBarAppearanceUpdate()
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
performSDKDelayLoading()
showFakeLoadingIndicator()
}
private func setup(view: HomeView) {
......@@ -126,14 +132,16 @@ extension HomeViewController: HomeViewModelView {
}
func tracingStatusChanged(headerTitle: String, statusVisible: Bool) {
homeView.updateView(headerTitle: headerTitle, showStatus: statusVisible)
showFakeLoadingIndicator()
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
if isSDKDelayElapsed {
homeView.updateView(headerTitle: headerTitle, showStatus: statusVisible)
showFakeLoadingIndicator()
}
}
@objc
func performComingToForegroundActions() {
showFakeLoadingIndicator()
viewModel.forceUIUpdate()
}
func showFakeLoadingIndicator() {
......@@ -144,6 +152,16 @@ extension HomeViewController: HomeViewModelView {
}
}
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
func performSDKDelayLoading() {
let loadingDelay = 1.5
DispatchQueue.main.asyncAfter(deadline: .now() + loadingDelay) { [weak self] in
guard let self = self else { return }
self.viewModel.forceUIUpdate()
self.isSDKDelayElapsed = true
}
}
func statusSectionChanged(
style: HomeSectionStyle,
title: String,
......@@ -152,15 +170,18 @@ extension HomeViewController: HomeViewModelView {
titleIsAllowedToHighlight: Bool,
imageIsAllowedToHighlight: Bool
) {
homeView.appStatusView.updateState(
style: style,
title: title,
description: description,
titleIsAllowedToHighlight: titleIsAllowedToHighlight,
imageIsAllowedToHighlight: imageIsAllowedToHighlight
)
homeView.appStatusView.isUserInteractionEnabled = canTap
homeView.appStatusView.isHidden = style.isHidden
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
if isSDKDelayElapsed {
homeView.appStatusView.updateState(
style: style,
title: title,
description: description,
titleIsAllowedToHighlight: titleIsAllowedToHighlight,
imageIsAllowedToHighlight: imageIsAllowedToHighlight
)
homeView.appStatusView.isUserInteractionEnabled = canTap
homeView.appStatusView.isHidden = style.isHidden
}
}
func tracingNotificationChanged(
......
......@@ -92,9 +92,10 @@ final class HomeViewModel {
updateInfectionState(state.homescreen)
updateMyData(state.homescreen)
}
// TODO: COVAPP-478 introduced this for workaround. Wait for SDK fix to remove this.
func forceUIUpdate() {
UIStateManager.shared.forceManualRefresh()
TracingManager.shared.forceStartTracing()
}
private func updateMyData(_ homescreen: UIStateModel.Homescreen) {
......
......@@ -64,7 +64,7 @@ enum Environment {
case .dev:
return URL(string: "https://pp2.test.digilugu.ee/hoiaLogin?redirectTo=HOIA")!
case .test:
return URL(string: "https://pp-m.test.digilugu.ee/hoiaLogin?redirectTo=HOIA")!
return URL(string: "https://pp2.test.digilugu.ee/hoiaLogin?redirectTo=HOIA")!
case .prod:
return URL(string: "https://www.digilugu.ee/hoiaLogin?redirectTo=HOIA")!
case .icefire:
......@@ -86,7 +86,7 @@ enum Environment {
case .dev:
return URL(string: "https://pp2.test.digilugu.ee/hoia/callback")!
case .test:
return URL(string: "https://pp-m.test.digilugu.ee/hoia/callback")!
return URL(string: "https://pp2.test.digilugu.ee/hoia/callback")!
case .prod:
return URL(string: "https://www.digilugu.ee/hoia/callback")!
case .icefire:
......
......@@ -124,6 +124,10 @@ class TracingManager: NSObject {
object: nil
)
forceStartTracing()
}
func forceStartTracing() {
if UserStorage.shared.hasCompletedOnboarding, isActivated {
startTracing()
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment