From c1d9b9a298857fc8f16a90e5d2053476ebffc6fd Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 6 Nov 2023 10:15:53 +0100 Subject: [PATCH] Always rebuild the project list when asking for the list; keep caching for projectAvailable --- src/fontra_rcjk/projectmanager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fontra_rcjk/projectmanager.py b/src/fontra_rcjk/projectmanager.py index f2a3ed3..c6dc1d5 100644 --- a/src/fontra_rcjk/projectmanager.py +++ b/src/fontra_rcjk/projectmanager.py @@ -161,11 +161,11 @@ async def projectAvailable(self, path): return path in self.projectMapping async def getProjectList(self): - await self._setupProjectList() + await self._setupProjectList(True) return sorted(self.projectMapping) - async def _setupProjectList(self): - if self.projectMapping is not None: + async def _setupProjectList(self, forceRebuild=False): + if not forceRebuild and self.projectMapping is not None: return projectMapping = await self.rcjkClient.get_project_font_uid_mapping() projectMapping = {f"{p}/{f}": uids for (p, f), uids in projectMapping.items()}