You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Mobile: Add support for plugin panels and dialogs (#10121)
This commit is contained in:
15
packages/app-mobile/commands/util/goToNote.ts
Normal file
15
packages/app-mobile/commands/util/goToNote.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import NavService from '@joplin/lib/services/NavService';
|
||||
|
||||
const goToNote = async (id: string, hash?: string) => {
|
||||
if (!(await Note.load(id))) {
|
||||
throw new Error(`No note with id ${id}`);
|
||||
}
|
||||
|
||||
return NavService.go('Note', {
|
||||
noteId: id,
|
||||
noteHash: hash,
|
||||
});
|
||||
};
|
||||
|
||||
export default goToNote;
|
Reference in New Issue
Block a user