From 03721fd3d6976e0004c3c86b82d15dbf4ed36089 Mon Sep 17 00:00:00 2001 From: erdivartanovich Date: Thu, 23 Mar 2023 20:15:51 +0700 Subject: [PATCH 1/2] Fix module import reference --- src/ItemNote.ts | 2 +- src/SettingsManager.ts | 2 +- src/data/PocketItemStore.ts | 2 +- src/data/URLToPocketItemNoteIndex.ts | 2 +- src/pocket_api/PocketAPI.ts | 2 +- src/pocket_api/PocketAuth.ts | 2 +- src/ui/components/PocketItem.tsx | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ItemNote.ts b/src/ItemNote.ts index 84b1595..fa5ad68 100644 --- a/src/ItemNote.ts +++ b/src/ItemNote.ts @@ -23,7 +23,7 @@ import { MultiWordTagConversion, TagNormalizationFn, } from "./Tags"; -import { ensureFolderExists, getPocketItemPocketURL } from "./utils"; +import { ensureFolderExists, getPocketItemPocketURL } from "./Utils"; const DEFAULT_ITEM_NOTES_FOLDER = "/"; diff --git a/src/SettingsManager.ts b/src/SettingsManager.ts index ca1fa21..cb9555b 100644 --- a/src/SettingsManager.ts +++ b/src/SettingsManager.ts @@ -1,7 +1,7 @@ import update from "immutability-helper"; import { CallbackId, CallbackRegistry } from "./CallbackRegistry"; import { MultiWordTagConversion } from "./Tags"; -import { getUniqueId } from "./utils"; +import { getUniqueId } from "./Utils"; export interface PocketSettings { "item-note-template"?: string; diff --git a/src/data/PocketItemStore.ts b/src/data/PocketItemStore.ts index cb96276..ebf7632 100644 --- a/src/data/PocketItemStore.ts +++ b/src/data/PocketItemStore.ts @@ -8,7 +8,7 @@ import { PocketItemRecord, SavedPocketItem, } from "../pocket_api/PocketAPITypes"; -import { getUniqueId } from "../utils"; +import { getUniqueId } from "../Utils"; import { ITEM_STORE_NAME, PocketIDB, PocketIDBUpgradeFn } from "./PocketIDB"; export type OnChangeCallback = () => Promise; diff --git a/src/data/URLToPocketItemNoteIndex.ts b/src/data/URLToPocketItemNoteIndex.ts index 9421e76..0ffd59b 100644 --- a/src/data/URLToPocketItemNoteIndex.ts +++ b/src/data/URLToPocketItemNoteIndex.ts @@ -3,7 +3,7 @@ import log from "loglevel"; import { EventRef, MetadataCache, Vault } from "obsidian"; import { CallbackId, CallbackRegistry } from "src/CallbackRegistry"; import { SettingsManager } from "src/SettingsManager"; -import { getUniqueId } from "src/utils"; +import { getUniqueId } from "src/Utils"; import { PocketIDB, PocketIDBUpgradeFn, diff --git a/src/pocket_api/PocketAPI.ts b/src/pocket_api/PocketAPI.ts index 851cc79..8667216 100644 --- a/src/pocket_api/PocketAPI.ts +++ b/src/pocket_api/PocketAPI.ts @@ -3,7 +3,7 @@ import { Notice, request } from "obsidian"; import * as qs from "query-string"; import { PocketGetItemsResponse } from "./PocketAPITypes"; import { SupportedPlatform } from "../Types"; -import { getPlatform } from "../utils"; +import { getPlatform } from "../Utils"; export type ResponseBody = string; diff --git a/src/pocket_api/PocketAuth.ts b/src/pocket_api/PocketAuth.ts index 41be07e..ad5511f 100644 --- a/src/pocket_api/PocketAuth.ts +++ b/src/pocket_api/PocketAuth.ts @@ -5,7 +5,7 @@ import { PocketAPI, RequestToken, } from "./PocketAPI"; -import { openBrowserWindow } from "../utils"; +import { openBrowserWindow } from "../Utils"; export type AccessInfo = AccessTokenResponse; diff --git a/src/ui/components/PocketItem.tsx b/src/ui/components/PocketItem.tsx index 314e63f..52d386c 100644 --- a/src/ui/components/PocketItem.tsx +++ b/src/ui/components/PocketItem.tsx @@ -13,7 +13,7 @@ import { getPlatform, getPocketItemPocketURL, openBrowserWindow, -} from "src/utils"; +} from "src/Utils"; import { PocketTag, pocketTagsToPocketTagList, From 5850417e145cdccf55514857c24c57d1a80f8012 Mon Sep 17 00:00:00 2001 From: erdivartanovich Date: Thu, 23 Mar 2023 20:16:32 +0700 Subject: [PATCH 2/2] Fix if empty getSetting of item-notes-folder --- src/ItemNote.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ItemNote.ts b/src/ItemNote.ts index fa5ad68..447854c 100644 --- a/src/ItemNote.ts +++ b/src/ItemNote.ts @@ -35,7 +35,7 @@ const DEFAULT_ITEM_NOTES_FOLDER = "/"; const MAXIMUM_TITLE_LENGTH = 255 - 8; const getItemNotesFolder = (settingsManager: SettingsManager) => - settingsManager.getSetting("item-notes-folder").replace(/\/+$/, "") ?? + settingsManager.getSetting("item-notes-folder")?.replace(/\/+$/, "") ?? DEFAULT_ITEM_NOTES_FOLDER; export const displayTextForSavedPocketItem = (item: SavedPocketItem) => {