π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
add refresh logic to default options to refresh indexing status, every 2 seconds
Abhinav42be46de7c29
diff --git a/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx b/apps/photos/src/components/Search/SearchBar/searchInput/index.tsxindex 8e2b04a337..bbc25cc99e 100644--- a/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx+++ b/apps/photos/src/components/Search/SearchBar/searchInput/index.tsx@@ -34,6 +34,7 @@ import { t } from 'i18next';import memoize from 'memoize-one';import { LocationTagData } from 'types/entity';import { FILE_TYPE } from 'constants/file';+import { addLogLine } from '@ente/shared/logging';interface Iprops {isOpen: boolean;@@ -64,10 +65,15 @@ export default function SearchInput(props: Iprops) {useEffect(() => {refreshDefaultOptions();+ const t = setInterval(() => refreshDefaultOptions(), 2000);+ return () => clearInterval(t);}, []);async function refreshDefaultOptions() {+ const t = Date.now();+ addLogLine('refreshDefaultOptions called');const defaultOptions = await getDefaultOptions(props.files);+ addLogLine(`refreshDefaultOptions end time: ${Date.now() - t}ms`);setDefaultOptions(defaultOptions);}