File tree Expand file tree Collapse file tree
functions/utilities/privacy Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments