From 8b7d51d3b075db778466e67c79bbddd1cb4d1a25 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 6 Jun 2024 19:33:01 +0200 Subject: [PATCH] lsisteners --- .../git/src/components/panels/commits.tsx | 7 ++----- libs/remix-ui/git/src/lib/listeners.ts | 20 ++++++------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/libs/remix-ui/git/src/components/panels/commits.tsx b/libs/remix-ui/git/src/components/panels/commits.tsx index b6b62b476b..9bdd268916 100644 --- a/libs/remix-ui/git/src/components/panels/commits.tsx +++ b/libs/remix-ui/git/src/components/panels/commits.tsx @@ -15,16 +15,13 @@ export const Commits = () => { const checkout = async (oid: string) => { try { - //await ModalRef.current?.show(); actions.checkout({ ref: oid }) - //Utils.log("yes"); } catch (e) { - //Utils.log("no"); + // } }; const loadNextPage = () => { - //actions.fetch(null, context.currentBranch.name, null, 5, true, true) actions.fetch({ remote: null, ref: context.currentBranch, @@ -32,7 +29,7 @@ export const Commits = () => { depth: 5, singleBranch: true }) - //actions.getBranchCommits(branch, lastPageNumber+1) + } const getRemote = () => { diff --git a/libs/remix-ui/git/src/lib/listeners.ts b/libs/remix-ui/git/src/lib/listeners.ts index 53d7701b73..6c44938fa6 100644 --- a/libs/remix-ui/git/src/lib/listeners.ts +++ b/libs/remix-ui/git/src/lib/listeners.ts @@ -55,15 +55,15 @@ export const setCallBacks = (viewPlugin: Plugin, gitDispatcher: React.Dispatch { - //await synTimerStart(); - }); - - plugin.on("fileManager", "currentFileChanged", async (e) => { - //await synTimerStart(); + loadFileQueue.enqueue(async () => { + loadFiles() + }) }); plugin.on("fileManager", "fileRenamed", async (oldfile, newfile) => { - //await synTimerStart(); + loadFileQueue.enqueue(async () => { + loadFiles() + }) }); plugin.on("filePanel", "setWorkspace", async (x: any) => { @@ -81,14 +81,6 @@ export const setCallBacks = (viewPlugin: Plugin, gitDispatcher: React.Dispatch { - //await synTimerStart(); - }); - - plugin.on("filePanel", "renameWorkspace" as any, async (x: any) => { - //await synTimerStart(); - }); - plugin.on('dgitApi', 'checkout', async () => { loadFileQueue.enqueue(async () => { gitlog()