clip
This commit is contained in:
parent
176431ba1f
commit
e3b7ffaeb4
4 changed files with 14 additions and 8 deletions
|
@ -1,18 +1,17 @@
|
|||
import { VerticallyCenteredFlex } from "@ente/shared/components/Container";
|
||||
import ChevronRight from "@mui/icons-material/ChevronRight";
|
||||
import ScienceIcon from "@mui/icons-material/Science";
|
||||
import { Box, DialogProps, Stack, Typography } from "@mui/material";
|
||||
import { EnteDrawer } from "components/EnteDrawer";
|
||||
import { EnteMenuItem } from "components/Menu/EnteMenuItem";
|
||||
import { MenuItemGroup } from "components/Menu/MenuItemGroup";
|
||||
import MenuSectionTitle from "components/Menu/MenuSectionTitle";
|
||||
import Titlebar from "components/Titlebar";
|
||||
import { MLSearchSettings } from "components/ml/MLSearchSettings";
|
||||
import { t } from "i18next";
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
|
||||
import { VerticallyCenteredFlex } from "@ente/shared/components/Container";
|
||||
import { EnteMenuItem } from "components/Menu/EnteMenuItem";
|
||||
import { MenuItemGroup } from "components/Menu/MenuItemGroup";
|
||||
import isElectron from "is-electron";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
import { CLIPIndexingStatus, clipService } from "services/clip-service";
|
||||
import { formatNumber } from "utils/number/format";
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class CLIPService {
|
|||
this.liveEmbeddingExtractionQueue = new PQueue({
|
||||
concurrency: 1,
|
||||
});
|
||||
eventBus.on(Events.LOGOUT, this.logoutHandler, this);
|
||||
eventBus.on(Events.LOGOUT, this.logout, this);
|
||||
}
|
||||
|
||||
isPlatformSupported = () => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import log from "@/next/log";
|
||||
import { accountLogout } from "@ente/accounts/services/logout";
|
||||
import { Events, eventBus } from "@ente/shared/events";
|
||||
import { clipService } from "services/clip-service";
|
||||
|
||||
/**
|
||||
* Logout sequence for the photos app.
|
||||
|
@ -12,6 +13,12 @@ import { Events, eventBus } from "@ente/shared/events";
|
|||
export const photosLogout = async () => {
|
||||
await accountLogout();
|
||||
|
||||
try {
|
||||
await clipService.logout();
|
||||
} catch (e) {
|
||||
log.error("Ignoring error in CLIP logout", e);
|
||||
}
|
||||
|
||||
const electron = globalThis.electron;
|
||||
if (electron) {
|
||||
try {
|
||||
|
@ -20,6 +27,7 @@ export const photosLogout = async () => {
|
|||
log.error("Ignoring error in native side logout sequence", e);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
eventBus.emit(Events.LOGOUT);
|
||||
} catch (e) {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { clearCaches } from "@/next/blob-cache";
|
||||
import log from "@/next/log";
|
||||
import InMemoryStore from "@ente/shared/storage/InMemoryStore";
|
||||
import loc } from "@ente/shared/storage/localForage";
|
||||
import localForage from "@ente/shared/storage/localForage";
|
||||
import { clearData } from "@ente/shared/storage/localStorage";
|
||||
import { clearKeys } from "@ente/shared/storage/sessionStorage";
|
||||
import { logout as remoteLogout } from "../api/user";
|
||||
import localForage from "@ente/shared/storage/localForage";
|
||||
|
||||
/**
|
||||
* Logout sequence common to all apps that rely on the accounts package.
|
||||
|
|
Loading…
Add table
Reference in a new issue