diff --git a/src/services/consistency_checks.ts b/src/services/consistency_checks.ts index acbca9715..fe37c7c15 100644 --- a/src/services/consistency_checks.ts +++ b/src/services/consistency_checks.ts @@ -10,7 +10,7 @@ import entityChangesService from "./entity_changes.js"; import optionsService from "./options.js"; import BBranch from "../becca/entities/bbranch.js"; import becca from "../becca/becca.js"; -import utils from "../services/utils.js"; +import { hash as getHash, hashedBlobId, randomString } from "../services/utils.js"; import eraseService from "../services/erase.js"; import sanitizeAttributeName from "./sanitize_attribute_name.js"; import noteTypesService from "../services/note_types.js"; @@ -454,7 +454,7 @@ class ConsistencyChecks { logError(`Unable to recover note ${noteId} since it's content could not be retrieved (might be protected note).`); return; } - const blobId = utils.hashedBlobId(blankContent); + const blobId = hashedBlobId(blankContent); const blobAlreadyExists = !!sql.getValue("SELECT 1 FROM blobs WHERE blobId = ?", [blobId]); if (!blobAlreadyExists) { @@ -466,7 +466,7 @@ class ConsistencyChecks { dateModified: fakeDate }); - const hash = utils.hash(utils.randomString(10)); + const hash = getHash(randomString(10)); entityChangesService.putEntityChange({ entityName: 'blobs', @@ -689,7 +689,7 @@ class ConsistencyChecks { entityChangesService.putEntityChange({ entityName, entityId, - hash: utils.randomString(10), // doesn't matter, will force sync, but that's OK + hash: randomString(10), // doesn't matter, will force sync, but that's OK isErased: false, utcDateChanged: entityRow.utcDateModified || entityRow.utcDateCreated, isSynced: entityName !== 'options' || entityRow.isSynced diff --git a/src/services/keyboard_actions.ts b/src/services/keyboard_actions.ts index ecf659041..00f5764c8 100644 --- a/src/services/keyboard_actions.ts +++ b/src/services/keyboard_actions.ts @@ -2,12 +2,12 @@ import optionService from "./options.js"; import log from "./log.js"; -import utils from "./utils.js"; +import { isElectron as getIsElectron } from "./utils.js"; import { KeyboardShortcut } from './keyboard_actions_interface.js'; import { t } from "i18next"; const isMac = process.platform === "darwin"; -const isElectron = utils.isElectron(); +const isElectron = getIsElectron(); function getDefaultKeyboardActions() { if (!t("keyboard_actions.note-navigation")) {