Move apiNoteView implementation into Backend
This commit is contained in:
parent
233ed4d0fb
commit
5a74350552
@ -57,8 +57,8 @@ function apiDefinitionsAddable(definitions, modes, optionsContext) {
|
|||||||
return utilBackend()._onApiDefinitionsAddable({definitions, modes, optionsContext});
|
return utilBackend()._onApiDefinitionsAddable({definitions, modes, optionsContext});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function apiNoteView(noteId) {
|
function apiNoteView(noteId) {
|
||||||
return utilBackend().anki.guiBrowse(`nid:${noteId}`);
|
return utilBackend()._onApiNoteView({noteId});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function apiTemplateRender(template, data, dynamic) {
|
async function apiTemplateRender(template, data, dynamic) {
|
||||||
|
@ -385,8 +385,8 @@ class Backend {
|
|||||||
return states;
|
return states;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onApiNoteView({noteId}) {
|
async _onApiNoteView({noteId}) {
|
||||||
return apiNoteView(noteId);
|
return this.anki.guiBrowse(`nid:${noteId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onApiTemplateRender({template, data, dynamic}) {
|
_onApiTemplateRender({template, data, dynamic}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user