1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: Resolves #8080: Add support for plugin user data (#8312)

This commit is contained in:
Laurent Cozic
2023-06-13 18:06:16 +01:00
committed by GitHub
parent 6424832984
commit 92c68882e2
67 changed files with 13357 additions and 232 deletions

View File

@ -11,6 +11,7 @@ import ShareService from '../services/share/ShareService';
import itemCanBeEncrypted from './utils/itemCanBeEncrypted';
import { getEncryptionEnabled } from '../services/synchronizer/syncInfoUtils';
import JoplinError from '../JoplinError';
import { LoadOptions } from './utils/types';
const { sprintf } = require('sprintf-js');
const moment = require('moment');
@ -227,9 +228,10 @@ export default class BaseItem extends BaseModel {
return ItemClass.loadByField(field, value);
}
public static loadItem(itemType: ModelType, id: string) {
public static loadItem(itemType: ModelType, id: string, options: LoadOptions = null) {
if (!options) options = {};
const ItemClass = this.itemClass(itemType);
return ItemClass.load(id);
return ItemClass.load(id, options);
}
public static deleteItem(itemType: ModelType, id: string) {