@@ -665,6 +665,28 @@ class HealthCertificateService: HealthCertificateServiceServable {
665
665
$0 == decodingFailedHealthCertificate
666
666
}
667
667
}
668
+
669
+ func updateGradients( ) {
670
+ let gradientTypes : [ GradientView . GradientType ] = [ . lightBlue, . mediumBlue, . darkBlue]
671
+ self . healthCertifiedPersons
672
+ . enumerated ( )
673
+ . forEach { index, person in
674
+ let healthCertificate = person. mostRelevantHealthCertificate
675
+
676
+ if healthCertificate? . validityState == . valid ||
677
+ healthCertificate? . validityState == . expiringSoon ||
678
+ ( healthCertificate? . type == . test && healthCertificate? . validityState == . expired) {
679
+ person. gradientType = gradientTypes [ index % 3 ]
680
+ } else {
681
+ person. gradientType = . solidGrey
682
+ }
683
+
684
+ // Overwrite the blue or grey with green when mask state is optional
685
+ if person. isMaskOptional {
686
+ person. gradientType = . green
687
+ }
688
+ }
689
+ }
668
690
669
691
// MARK: - Private
670
692
@@ -748,28 +770,6 @@ class HealthCertificateService: HealthCertificateServiceServable {
748
770
}
749
771
}
750
772
751
- private func updateGradients( ) {
752
- let gradientTypes : [ GradientView . GradientType ] = [ . lightBlue, . mediumBlue, . darkBlue]
753
- self . healthCertifiedPersons
754
- . enumerated ( )
755
- . forEach { index, person in
756
- let healthCertificate = person. mostRelevantHealthCertificate
757
-
758
- if healthCertificate? . validityState == . valid ||
759
- healthCertificate? . validityState == . expiringSoon ||
760
- ( healthCertificate? . type == . test && healthCertificate? . validityState == . expired) {
761
- person. gradientType = gradientTypes [ index % 3 ]
762
- } else {
763
- person. gradientType = . solidGrey
764
- }
765
-
766
- // Overwrite the blue or grey with green when mask state is optional
767
- if person. isMaskOptional {
768
- person. gradientType = . green
769
- }
770
- }
771
- }
772
-
773
773
private func updateDCCWalletInfo( for person: HealthCertifiedPerson , completion: ( ( ) -> Void ) ? = nil ) {
774
774
guard !CWAHibernationProvider. shared. isHibernationState else {
775
775
completion ? ( )
0 commit comments