From 0924f5717e5ac12a946579c69e6c364da9632d47 Mon Sep 17 00:00:00 2001 From: Andrew Young Date: Wed, 24 Apr 2024 23:36:18 -0400 Subject: [PATCH 1/2] fix: file tree does not refresh automatically Co-authored-by: Andrew Young Co-authored-by: Faizan Bhagat --- src/brackets.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/brackets.js b/src/brackets.js index 865e3cb402..cc43949dc7 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -447,6 +447,9 @@ define(function (require, exports, module) { // This call to syncOpenDocuments() *should* be a no-op now that we have // file watchers, but is still here as a safety net. FileSyncManager.syncOpenDocuments(); + // This call to refreshFileTree() refreshes the project tree when the window comes back into focus + // If any changes are made outside of Phoenix Code, they will be updated when the user returns + ProjectManager.refreshFileTree(); }); // Prevent unhandled middle button clicks from triggering native behavior From 3f3abfb971b58faf254bd7b0463f29bd005a7d1c Mon Sep 17 00:00:00 2001 From: Andrew Young Date: Thu, 25 Apr 2024 11:50:08 -0400 Subject: [PATCH 2/2] fix: refresh filesystem on focus in browser only Co-authored-by: Andrew Young Co-authored-by: Faizan Bhagat --- src/brackets.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/brackets.js b/src/brackets.js index cc43949dc7..efd15ebce9 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -447,9 +447,11 @@ define(function (require, exports, module) { // This call to syncOpenDocuments() *should* be a no-op now that we have // file watchers, but is still here as a safety net. FileSyncManager.syncOpenDocuments(); - // This call to refreshFileTree() refreshes the project tree when the window comes back into focus - // If any changes are made outside of Phoenix Code, they will be updated when the user returns - ProjectManager.refreshFileTree(); + if(!Phoenix.browser.isTauri) { // dont do this in desktop builds as native fs watchers will take care of external changes + // Refresh the project tree when the window comes back into focus + // Changes made outside of Phoenix Code will be updated when the user returns + ProjectManager.refreshFileTree(); + } }); // Prevent unhandled middle button clicks from triggering native behavior