Skip to content

Commit

Permalink
Fix: #21 Note count off settings not respected
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Aug 7, 2021
1 parent c1f4d0b commit 8573716
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/noteoverview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,16 +522,20 @@ export namespace noteoverview {
}

export async function loadGlobalSettings() {
globalSettings = {};
globalSettings.dateFormat = await joplin.settings.globalValue("dateFormat");
globalSettings.timeFormat = await joplin.settings.globalValue("timeFormat");
globalSettings.statusText = await noteoverview.getDefaultStatusText();
globalSettings.coloring = await noteoverview.getDefaultColoring();
const showNoteCount = await joplin.settings.value("showNoteCount");
if (showNoteCount !== false) {
if (showNoteCount !== "off") {
globalSettings.showNoteCount = {
enable: true,
position: showNoteCount,
text: await joplin.settings.value("showNoteCountText"),
};
} else {
globalSettings.showNoteCount = { enable: false };
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export namespace settings {
description: "0 = disable automatic note overview creation",
},
showNoteCount: {
value: "Off",
value: "off",
type: SettingItemType.String,
section: "noteOverviewSection",
isEnum: true,
public: true,
label: "Show note count",
options: {
false: "Off",
off: "Off",
above: "Above",
below: "Below",
},
Expand Down

0 comments on commit 8573716

Please sign in to comment.