diff --git a/app/src/context/projects-context.tsx b/app/src/context/projects-context.tsx index a6826f777..b16adc7ab 100644 --- a/app/src/context/projects-context.tsx +++ b/app/src/context/projects-context.tsx @@ -3,6 +3,7 @@ import { activateProjectDB, getProjectsDB, setSyncProjectDB, + updateProjectsDB, } from '../dbs/projects-db'; import {activate_project} from '../sync/process-initialization'; import {ProjectExtended} from '../types/project'; @@ -70,7 +71,10 @@ export function ProjectsProvider({children}: {children: ReactNode}) { }); } - setProjects([...newProjectsMap.values()]); + const newProjects = [...newProjectsMap.values()]; + + updateProjectsDB(newProjects); + setProjects(newProjects); }; /** @@ -96,7 +100,10 @@ export function ProjectsProvider({children}: {children: ReactNode}) { }); } - setProjects([...newProjectsMap.values()]); + const newProjects = [...newProjectsMap.values()]; + + updateProjectsDB(newProjects); + setProjects(newProjects); }; /**