clear ml db on ml disable
This commit is contained in:
parent
233073c90a
commit
ec1d3e6e4e
|
@ -37,6 +37,7 @@ import FixLargeThumbnails from './FixLargeThumbnail';
|
||||||
import { AppContext } from 'pages/_app';
|
import { AppContext } from 'pages/_app';
|
||||||
import { canEnableMlSearch } from 'utils/machineLearning/compatibility';
|
import { canEnableMlSearch } from 'utils/machineLearning/compatibility';
|
||||||
import { SetLoading } from 'types/gallery';
|
import { SetLoading } from 'types/gallery';
|
||||||
|
import mlIDbStorage from 'utils/storage/mlIDbStorage';
|
||||||
interface Props {
|
interface Props {
|
||||||
collections: Collection[];
|
collections: Collection[];
|
||||||
setDialogMessage: SetDialogMessage;
|
setDialogMessage: SetDialogMessage;
|
||||||
|
@ -62,6 +63,7 @@ export default function Sidebar(props: Props) {
|
||||||
};
|
};
|
||||||
const disableMlSearch = async () => {
|
const disableMlSearch = async () => {
|
||||||
await appContext.updateMlSearchEnabled(false);
|
await appContext.updateMlSearchEnabled(false);
|
||||||
|
await mlIDbStorage.clearMLDB();
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
|
|
Loading…
Reference in a new issue