Revert "dont clear ml db on disable ml search"

This reverts commit a475c6afef.
This commit is contained in:
Abhinav 2022-04-18 10:55:22 +05:30
parent 080fcab6a3
commit 2a3e1b90a6

View file

@ -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 () => {