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 { canEnableMlSearch } from 'utils/machineLearning/compatibility';
|
||||
import { SetLoading } from 'types/gallery';
|
||||
import mlIDbStorage from 'utils/storage/mlIDbStorage';
|
||||
interface Props {
|
||||
collections: Collection[];
|
||||
setDialogMessage: SetDialogMessage;
|
||||
|
@ -62,6 +63,7 @@ export default function Sidebar(props: Props) {
|
|||
};
|
||||
const disableMlSearch = async () => {
|
||||
await appContext.updateMlSearchEnabled(false);
|
||||
await mlIDbStorage.clearMLDB();
|
||||
};
|
||||
useEffect(() => {
|
||||
const main = async () => {
|
||||
|
|
Loading…
Reference in a new issue