Skip to content

Commit ee67ae7

Browse files
authored
Merge branch 'master' into beta-new
2 parents c09c72d + d36bd9b commit ee67ae7

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

functions/utilities/privacy/utils.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ const getPrivacyState = (email, user) => {
107107

108108
const shouldRetry = shouldRetryPopup(latestTouch, useUnder13);
109109

110+
const delayResponse = {
111+
visible: true,
112+
mode: useUnder13 ? "under-13-delay" : "over-13-delay",
113+
variant
114+
};
115+
110116
if (firstSeen && dueBy) {
111117
// User has seen popup before
112118

@@ -120,25 +126,27 @@ const getPrivacyState = (email, user) => {
120126
};
121127
}
122128

123-
if (!shouldRetry) {
124-
// User has seen popup before but within 7 days
125-
// and not time to retry yet
129+
if (shouldRetry) {
130+
// User has seen popup before and they should retry
126131
return {
127-
debug: 4,
128-
visible: false,
129-
mode: "none",
130-
variant
132+
debug: 7,
133+
...delayResponse,
131134
};
132135
}
136+
137+
// User has seen popup before but within 7 days
138+
return {
139+
debug: 4,
140+
visible: false,
141+
mode: "none",
142+
variant
143+
};
133144
}
134145

135146
// User has not seen popup before
136-
// or it's time to retry
137147
return {
138148
debug: 5,
139-
visible: true,
140-
mode: useUnder13 ? "under-13-delay" : "over-13-delay",
141-
variant
149+
...delayResponse
142150
};
143151
};
144152

0 commit comments

Comments
 (0)