clarify variables

pull/5247/head
yann300 4 months ago committed by Aniket
parent 073cff510c
commit 9f31ab2d27
  1. 18
      apps/remix-ide/src/app.js

@ -189,20 +189,14 @@ class AppComponent {
const sixMonthsAgo = new Date();
sixMonthsAgo.setMonth(sixMonthsAgo.getMonth() - 6);
this.showMatomo =
(matomoDomains[window.location.hostname] || electronTracking
|| (window.localStorage.getItem('showMatomo')
&& window.localStorage.getItem('showMatomo') === 'true'))
&& (!this.matomoConfAlreadySet
|| (this.matomoCurrentSetting === false
&& (!lastMatomoCheck || new Date(Number(lastMatomoCheck)) < sixMonthsAgo)
));
if(this.matomoCurrentSetting === false
&& (!lastMatomoCheck || new Date(Number(lastMatomoCheck)) < sixMonthsAgo)) {
const e2eforceMatomoToShow = window.localStorage.getItem('showMatomo') && window.localStorage.getItem('showMatomo') === 'true'
const contextShouldShowMatomo = matomoDomains[window.location.hostname] || e2eforceMatomoToShow || electronTracking
const shouldRenewConsent = this.matomoCurrentSetting === false && (!lastMatomoCheck || new Date(Number(lastMatomoCheck)) < sixMonthsAgo) // it is set to false for more than 6 months.
this.showMatomo = contextShouldShowMatomo && (!this.matomoConfAlreadySet || shouldRenewConsent)
if (this.showMatomo && shouldRenewConsent) {
_paq.push(['trackEvent', 'Matomo', 'refreshMatomoPermissions']);
}
this.walkthroughService = new WalkthroughService(appManager)

Loading…
Cancel
Save