A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
common: add toolbar migration for addInternalLink tool
Abdullah Atta3d8579521600
diff --git a/packages/common/src/utils/migrate-toolbar.ts b/packages/common/src/utils/migrate-toolbar.tsindex 266f944ac..4ba802f68 100644--- a/packages/common/src/utils/migrate-toolbar.ts+++ b/packages/common/src/utils/migrate-toolbar.ts@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { ToolbarConfig, ToolbarConfigPlatforms } from "@notesnook/core";import { database } from "../database";-export const CURRENT_TOOLBAR_VERSION = 1;+export const CURRENT_TOOLBAR_VERSION = 2;export async function migrateToolbar(platform: ToolbarConfigPlatforms,tools: ToolbarConfig@@ -43,6 +43,16 @@ function runMigration(tools.config?.push(["checkList"]);return runMigration(1, platform, tools);}+ case 1: {+ const group = tools.config?.find(+ (g) => Array.isArray(g) && g.includes("addLink")+ );+ if (!group) tools.config?.push(["addInternalLink"]);+ else if (!group.includes("addInternalLink"))+ group.push("addInternalLink");++ return runMigration(2, platform, tools);+ }case CURRENT_TOOLBAR_VERSION:default:break;