Skip to content

Commit bf75dba

Browse files
committed
update toolbar buttons visibility on initial load
1 parent 8aebc1d commit bf75dba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plugins/driveBrowserPlugin.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ export const driveFileBrowser: JupyterFrontEndPlugin<void> = {
148148
}
149149
);
150150

151+
// Add commands
152+
Private.addCommands(app, drive, driveBrowser);
153+
151154
const updateVisibility = () => {
152155
// Visibility of context menu and toolbar commands changed.
153156
if (driveBrowser.model.path !== 's3:') {
@@ -162,9 +165,7 @@ export const driveFileBrowser: JupyterFrontEndPlugin<void> = {
162165

163166
// Listen for path changes.
164167
driveBrowser.model.pathChanged.connect(updateVisibility);
165-
166-
// Add commands
167-
Private.addCommands(app, drive, driveBrowser);
168+
updateVisibility();
168169

169170
// Connect the filebrowser toolbar to the settings registry for the plugin.
170171
setToolbar(

0 commit comments

Comments
 (0)