Skip to content

Commit 1823d82

Browse files
ayoung5555faizanbhagat
authored andcommitted
fix: refresh filesystem on focus in browser only
Co-authored-by: Andrew Young <[email protected]> Co-authored-by: Faizan Bhagat <[email protected]>
1 parent 63f2ad6 commit 1823d82

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/brackets.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,11 @@ define(function (require, exports, module) {
447447
// This call to syncOpenDocuments() *should* be a no-op now that we have
448448
// file watchers, but is still here as a safety net.
449449
FileSyncManager.syncOpenDocuments();
450-
// This call to refreshFileTree() refreshes the project tree when the window comes back into focus
451-
// If any changes are made outside of Phoenix Code, they will be updated when the user returns
452-
ProjectManager.refreshFileTree();
450+
if(!Phoenix.browser.isTauri) { // dont do this in desktop builds as native fs watchers will take care of external changes
451+
// Refresh the project tree when the window comes back into focus
452+
// Changes made outside of Phoenix Code will be updated when the user returns
453+
ProjectManager.refreshFileTree();
454+
}
453455
});
454456

455457
// Prevent unhandled middle button clicks from triggering native behavior

0 commit comments

Comments
 (0)