Skip to content

Commit d4b07d8

Browse files
committed
fix: Correction du cache des thèmes
1 parent 43f244f commit d4b07d8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/theme.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ async function getCustomTheme() {
5959
const lastFetchTimestamp = await browser.storage.local.get(lastFetchTimestampKey);
6060

6161
// Récupère le thème personnalisé toutes les heures
62-
// if (!lastFetchTimestamp[lastFetchTimestampKey] || currentTimestamp - lastFetchTimestamp[lastFetchTimestampKey] > 3600000) {
63-
if (1 === 1) {
62+
if (!lastFetchTimestamp[lastFetchTimestampKey] || currentTimestamp - lastFetchTimestamp[lastFetchTimestampKey] > 3600000) {
63+
// if (1 === 1) {
6464
console.info("[Better IUT RCC] 📑 Récupération du thème personnalisé...");
6565
const metadataResponse = await fetch(`https://betteriutrcc.bayfield.dev/v1/themes/${themeName}`);
6666

@@ -76,8 +76,8 @@ async function getCustomTheme() {
7676

7777
const cache = await browser.storage.local.get(storageKey);
7878

79-
// if (cache[storageKey]) {
80-
if (1 !== 1) {
79+
if (cache[storageKey]) {
80+
// if (1 !== 1) {
8181
console.info(`[Better IUT RCC] Thème trouvé en cache (${storageKey})`);
8282
injectCSS(cache[storageKey]);
8383
} else {

0 commit comments

Comments
 (0)