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});
|
||||
}
|
||||
|
||||
async function apiNoteView(noteId) {
|
||||
return utilBackend().anki.guiBrowse(`nid:${noteId}`);
|
||||
function apiNoteView(noteId) {
|
||||
return utilBackend()._onApiNoteView({noteId});
|
||||
}
|
||||
|
||||
async function apiTemplateRender(template, data, dynamic) {
|
||||
|
@ -385,8 +385,8 @@ class Backend {
|
||||
return states;
|
||||
}
|
||||
|
||||
_onApiNoteView({noteId}) {
|
||||
return apiNoteView(noteId);
|
||||
async _onApiNoteView({noteId}) {
|
||||
return this.anki.guiBrowse(`nid:${noteId}`);
|
||||
}
|
||||
|
||||
_onApiTemplateRender({template, data, dynamic}) {
|
||||
|
Loading…
Reference in New Issue
Block a user