From 83305ca4f48edca85f539f73e84d1a954a4e2413 Mon Sep 17 00:00:00 2001 From: benji300 Date: Sun, 28 Mar 2021 01:01:32 +0100 Subject: [PATCH] Minor improvements --- src/index.ts | 4 ++-- src/settings.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 171c888..aa4f65f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import joplin from 'api'; import { MenuItem, MenuItemLocation } from 'api/types'; import { ChangeEvent } from 'api/JoplinSettings'; -import { Settings, DefaultKeys } from './settings'; +import { DefaultKeys, SettingDefaults, Settings } from './settings'; import { DA } from './data'; joplin.plugins.register({ @@ -17,7 +17,7 @@ joplin.plugins.register({ //#region HELPERS async function quickMoveToFolder(actionId: number, quickMoveFolderId: string, noteIds: string[]) { - if (quickMoveFolderId === undefined || quickMoveFolderId === '0') return; + if (quickMoveFolderId === undefined || quickMoveFolderId === SettingDefaults.Empty) return; // get selected note ids and return if empty let selectedNoteIds = noteIds; diff --git a/src/settings.ts b/src/settings.ts index 8fef944..9e1041c 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -22,7 +22,7 @@ export enum DefaultKeys { * Advanced style setting default values. * Used when setting is set to 'default'. */ -enum SettingDefaults { +export enum SettingDefaults { Empty = '0', Default = 'default', FontFamily = 'Roboto', @@ -177,7 +177,7 @@ export class Settings { section: 'qm.settings', public: true, label: 'Keep moved note selected', - description: 'If the selected note is moved via one of the move actions, it is still selected afterwards. ' + + description: 'If the selected note is moved via one of the quick move actions, it is still selected afterwards. ' + 'Otherwise, the next note within the current notebook is selected. ' + 'If several notes have been moved, the last one remains selected.' });