Skip to content

Commit 3930b41

Browse files
authored
Enx verbiage (#975)
* add enxnotificationText to env * add verbiage * formatting * remove code not needed * add needed code * remove label * Update mobile_resources_commit * switched to use ENX_INAPP_TEXT
1 parent 634d6af commit 3930b41

File tree

8 files changed

+17
-4
lines changed

8 files changed

+17
-4
lines changed

ios/BT/ExposureManager.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ final class ExposureManager: NSObject {
207207
let identifier = String.enxMigrationIdentifier
208208
let content = UNMutableNotificationContent()
209209
content.title = String.enxMigrationNotificationTitle.localized
210-
content.body = String.enxMigrationNotificationContent.localized
210+
content.body = String(ReactNativeConfig.env(for: .enxNotificationText))
211+
//content.body = String.enxMigrationNotificationContent.localized
211212
content.userInfo = [String.notificationUrlKey: "\(String.notificationUrlBasePath)"]
212213
content.sound = .default
213214

ios/BT/Extensions/Foundation/String+Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extension String {
3232
static let hmackey = "HMAC_KEY"
3333
static let regionCodes = "REGION_CODES"
3434
static let dev = "DEV"
35+
static let enxNotificationText = "ENX_NOTIFICATION_TEXT"
3536

3637
// Notifications
3738
static let bluetoothNotificationTitle = "Bluetooth Off"

mobile_resources_commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9466165c85fc4c1499b912932c41289b5d1ced5d
1+
1044389b5672dce75a18d7f61ae5bf70b5509118

src/Home/EnxMigrationInfo.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
} from "../styles"
2121
import { Icons, Images } from "../assets"
2222
import { SvgXml } from "react-native-svg"
23+
import { useConfigurationContext } from "../configuration"
2324

2425
interface EnxMigrationInfoProps {
2526
enxRegion: string
@@ -29,6 +30,7 @@ const EnxMigrationInfo: FunctionComponent<EnxMigrationInfoProps> = ({
2930
enxRegion,
3031
}) => {
3132
const { t } = useTranslation()
33+
const { enxNotificationText } = useConfigurationContext()
3234
const onboardingUrl = `ens://onboarding?r=${enxRegion}`
3335

3436
const handleOnPress = async () => {
@@ -47,13 +49,13 @@ const EnxMigrationInfo: FunctionComponent<EnxMigrationInfoProps> = ({
4749
<TouchableOpacity
4850
style={style.shareContainer}
4951
onPress={handleOnPress}
50-
accessibilityLabel={t("home.migrate_enx")}
52+
accessibilityLabel={enxNotificationText}
5153
>
5254
<View style={style.imageContainer}>
5355
<Image source={Images.ExclamationInCircle} style={style.image} />
5456
</View>
5557
<View style={style.textContainer}>
56-
<Text style={style.shareText}>{t("home.migrate_enx")}</Text>
58+
<Text style={style.shareText}>{enxNotificationText}</Text>
5759
</View>
5860
<SvgXml
5961
xml={Icons.ChevronRight}

src/configuration/configurationContext.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const initialState: Configuration = {
2121
emergencyPhoneNumber: "",
2222
enableProductAnalytics: false,
2323
enxRegion: "",
24+
enxNotificationText:
25+
"Click here to enable the new Exposure Notifications. In order to stay protected from COVID-19, you need to take this step. After that, this app can be safely deleted.",
2426
externalCovidDataLabel: "home.covid_data",
2527
externalCovidDataLink: null,
2628
externalTravelGuidanceLink: null,

src/configuration/configurationInterface.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ interface Configuration {
2121
enableProductAnalytics: boolean
2222
emergencyPhoneNumber: string
2323
enxRegion: string
24+
enxNotificationText: string
2425
externalCovidDataLink: string | null // link to show external covid data link on main page
2526
externalCovidDataLabel: string // custom label for external covid data, will default to "Covid Data"
2627
externalTravelGuidanceLink: string | null // link to external travel guidence link on main page

src/configuration/configurationProvider.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ const ConfigurationProvider: FunctionComponent = ({ children }) => {
9696

9797
// Enx migration
9898
const enxRegion = env.ENX_REGION || ""
99+
const enxNotificationText =
100+
env.ENX_INAPP_TEXT ||
101+
"Click here to enable the new Exposure Notifications. In order to stay protected from COVID-19, you need to take this step. After that, this app can be safely deleted."
99102

100103
return (
101104
<ConfigurationContext.Provider
@@ -116,6 +119,7 @@ const ConfigurationProvider: FunctionComponent = ({ children }) => {
116119
displaySelfAssessment,
117120
displayAgeVerification,
118121
enableProductAnalytics,
122+
enxNotificationText,
119123
enxRegion,
120124
emergencyPhoneNumber,
121125
externalCovidDataLabel,

src/factories/configurationContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export default Factory.define<Configuration>(() => ({
1919
displayAgeVerification: false,
2020
enableProductAnalytics: false,
2121
enxRegion: "",
22+
enxNotificationText:
23+
"Click here to enable the new Exposure Notifications. In order to stay protected from COVID-19, you need to take this step. After that, this app can be safely deleted.",
2224
externalCovidDataLabel: "home.covid_data",
2325
externalCovidDataLink: null,
2426
externalTravelGuidanceLink: null,

0 commit comments

Comments
 (0)