Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Handle user overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Nov 29, 2021
1 parent 23662b2 commit fe7a67d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/application-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
menu.viewMenu.addGroup([{ command: CommandIDs.toggleTop }], 2);
}

let settingOverride = false;
let settingsOverride = false;

if (settingRegistry) {
const loadSettings = settingRegistry.load(pluginId);
const updateSettings = (settings: ISettingRegistry.ISettings): void => {
const visible = settings.get('visible').composite;
if (visible !== undefined) {
settingOverride = true;
if (settings.user.visible !== undefined) {
settingsOverride = true;
top.setHidden(!visible);
}
};
Expand All @@ -552,7 +552,7 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
}

const onChanged = (): void => {
if (settingOverride) {
if (settingsOverride) {
return;
}
if (app.format === 'desktop') {
Expand Down

0 comments on commit fe7a67d

Please sign in to comment.