Skip to content

Commit

Permalink
fix: double scan minor fixes
Browse files Browse the repository at this point in the history
Co-authored-by: Johnny Bueti <[email protected]>
Co-authored-by: eapuzzo <[email protected]>
  • Loading branch information
3 people authored Mar 8, 2022
1 parent 73cf34b commit a1f46b9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions DGCAVerifier/Pages/Result/VerificationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class VerificationViewController: UIViewController {
if !VerificationState.shared.followUpTestScanned {
guard status == .verificationIsNeeded else { return }
addSecondScanButton()
} else if VerificationState.shared.isFollowUpScan {
} else if VerificationState.shared.isFollowUpScan && status != .notGreenPass {
addTickView(status)
}
}
Expand Down Expand Up @@ -151,7 +151,7 @@ class VerificationViewController: UIViewController {

private func validate(_ status: Status) {
var statusWithValidIdentity: Status = status
if VerificationState.shared.followUpTestScanned && !self.viewModel.isPersonalDataCongruent() {
if VerificationState.shared.followUpTestScanned && !self.viewModel.isPersonalDataCongruent() && status != .notGreenPass {
statusWithValidIdentity = .notValid
}

Expand Down
3 changes: 3 additions & 0 deletions DGCAVerifier/Pages/Result/VerificationViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ class VerificationViewModel {
let scanMode = ScanMode.fetchFromLocalSettings(),
let hCert = HCert(from: payload) else {
self.status = .notGreenPass
if VerificationState.shared.shouldValidateTestOnly() {
VerificationState.shared.followUpTestScanned = true
}
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ extension Status {
var secondScanTitle: String {
switch self {
case .valid: return "result.second.scan.title.valid"
case .notValidYet: return "result.second.scan.title.not.valid"
case .notValid: return "result.second.scan.title.not.valid"
default: return "result.title.not.green.pass"
case .expired: return "result.second.scan.title.not.valid"
case .revokedGreenPass: return "result.second.scan.title.not.valid"
case .verificationIsNeeded: return "result.second.scan.title.not.valid"
case .notGreenPass: return "result.title.not.green.pass"
}
}

Expand Down
16 changes: 8 additions & 8 deletions Verifier.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2144,7 +2144,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2168,7 +2168,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2255,7 +2255,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2280,7 +2280,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2411,7 +2411,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2436,7 +2436,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -2630,7 +2630,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2655,7 +2655,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.8;
MARKETING_VERSION = 1.2.9;
PRODUCT_BUNDLE_IDENTIFIER = it.ministerodellasalute.VerificaC19;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit a1f46b9

Please sign in to comment.