aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProviderQuiz.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/StyleProviderQuiz.tsx')
-rw-r--r--src/client/views/StyleProviderQuiz.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/StyleProviderQuiz.tsx b/src/client/views/StyleProviderQuiz.tsx
index c2c352113..acda38dd7 100644
--- a/src/client/views/StyleProviderQuiz.tsx
+++ b/src/client/views/StyleProviderQuiz.tsx
@@ -3,7 +3,7 @@ import { Tooltip } from '@mui/material';
import { runInAction } from 'mobx';
import * as React from 'react';
import { returnFalse, setupMoveUpEvents } from '../../ClientUtils';
-import { emptyFunction } from '../../Utils';
+import { emptyFunction, unimplementedFunction } from '../../Utils';
import { Doc, DocListCast, Opt } from '../../fields/Doc';
import { DocData } from '../../fields/DocSymbols';
import { List } from '../../fields/List';
@@ -113,7 +113,7 @@ export namespace styleProviderQuiz {
/**
* Create flashcards from an image.
*/
- async function getImageDesc(img: ImageBox) {
+ async function makeFlashcardsForImage(img: ImageBox) {
img.Loading = true;
try {
const hrefBase64 = await createCanvas(img);
@@ -383,10 +383,7 @@ export namespace styleProviderQuiz {
}
break;
case StyleProp.AnchorMenuItems:
- if (imgBox) {
- AnchorMenu.Instance.gptFlashcards = () => getImageDesc(imgBox);
- AnchorMenu.Instance.makeLabels = () => makeLabels(props?.DocumentView?.().ComponentView as ImageBox);
- }
+ AnchorMenu.Instance.makeLabels = imgBox ? () => makeLabels(props?.DocumentView?.().ComponentView as ImageBox) : unimplementedFunction;
}
return undefined;
}