()
| 155 | if ($[0] !== location || $[1] !== onDone || $[2] !== showIfAlreadyViewed) { |
| 156 | t1 = () => { |
| 157 | const checkGroveSettings = async function checkGroveSettings() { |
| 158 | const [settingsResult, configResult] = await Promise.all([getGroveSettings(), getGroveNoticeConfig()]); |
| 159 | const config = configResult.success ? configResult.data : null; |
| 160 | setGroveConfig(config); |
| 161 | const shouldShow = calculateShouldShowGrove(settingsResult, configResult, showIfAlreadyViewed); |
| 162 | setShouldShowDialog(shouldShow); |
| 163 | if (!shouldShow) { |
| 164 | onDone("skip_rendering"); |
| 165 | return; |
| 166 | } |
| 167 | markGroveNoticeViewed(); |
| 168 | logEvent("tengu_grove_policy_viewed", { |
| 169 | location: location as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, |
| 170 | dismissable: config?.notice_is_grace_period as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS |
| 171 | }); |
| 172 | }; |
| 173 | checkGroveSettings(); |
| 174 | }; |
| 175 | t2 = [showIfAlreadyViewed, location, onDone]; |
no test coverage detected