Update progress

pull/5913/head
Kamran Ahmed 9 months ago
parent f5fc71aadb
commit 894b66f026
  1. 6
      src/lib/resource-progress.ts

@ -98,12 +98,14 @@ export function clearMigratedRoadmapProgress(
const roadmapKey = `${resourceType}-${resourceId}-${userId}-progress`; const roadmapKey = `${resourceType}-${resourceId}-${userId}-progress`;
const clearedKey = `${resourceType}-${resourceId}-${userId}-cleared`; const clearedKey = `${resourceType}-${resourceId}-${userId}-cleared`;
if (localStorage.getItem(clearedKey)) {
const clearedCount = parseInt(localStorage.getItem(clearedKey) || '0', 10);
if (!clearedCount || clearedCount >= 10) {
return; return;
} }
localStorage.removeItem(roadmapKey); localStorage.removeItem(roadmapKey);
localStorage.setItem(clearedKey, '1'); localStorage.setItem(clearedKey, `${clearedCount + 1}`);
} }
export async function getResourceProgress( export async function getResourceProgress(

Loading…
Cancel
Save