mirror of
https://github.com/laurent22/joplin.git
synced 2026-10-25 02:47:28 +00:00
Mobile: Add note revision viewer (#12305)
This commit is contained in:
1 parent
47e4f36f97
commit
293eac9c04
13 files changed
+366
-30
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import BaseModel from '../BaseModel';
|
||||
import Note from '../models/Note';
|
||||
import Resource from '../models/Resource';
|
||||
import ResourceLocalState from '../models/ResourceLocalState';
|
||||
import { ResourceEntity } from '../services/database/types';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
let resourceCache_: any = {};
|
||||
@@ -9,8 +11,15 @@ export function clearResourceCache() {
|
||||
resourceCache_ = {};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
export default async function attachedResources(noteBody: string): Promise<any> {
|
||||
interface AttachedResource {
|
||||
item: ResourceEntity;
|
||||
localState: ResourceLocalState;
|
||||
}
|
||||
export interface AttachedResources {
|
||||
[id: string]: AttachedResource;
|
||||
}
|
||||
|
||||
export default async function attachedResources(noteBody: string): Promise<AttachedResources> {
|
||||
if (!noteBody) return {};
|
||||
const resourceIds = await Note.linkedItemIdsByType(BaseModel.TYPE_RESOURCE, noteBody);
|
||||
|
||||
|
||||
Reference in new issue
Block a user