Skip to content

Commit

Permalink
Refresh file browser on head change (#950) (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
navn-r authored Jun 30, 2021
1 parent c5e09cb commit 4fd9052
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ async function activate(
gitExtension.pathRepository = change.newValue;
}
);

// Whenever the `HEAD` of the Git repository changes, refresh the file browser
gitExtension.headChanged.connect(() => {
filebrowser.model.refresh();
});

// Whenever a user adds/renames/saves/deletes/modifies a file within the lab environment, refresh the Git status
app.serviceManager.contents.fileChanged.connect(() =>
gitExtension.refreshStatus()
Expand Down

0 comments on commit 4fd9052

Please sign in to comment.