From 2a3e1b90a6c26105622b059c10c02f490246ad48 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Mon, 18 Apr 2022 10:55:22 +0530 Subject: [PATCH] Revert "dont clear ml db on disable ml search" This reverts commit a475c6afefa5c3cd62dcf971038e3b34266abe51. --- src/components/Sidebar.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 862022a69..5de6dd650 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -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 () => {