Desktop
This commit is contained in:
@@ -12,19 +12,22 @@ import { watchReset } from "./watch";
|
||||
* See: [Note: Do not throw during logout].
|
||||
*/
|
||||
export const logout = (watcher: FSWatcher) => {
|
||||
const ignoreError = (label: string, e: unknown) =>
|
||||
log.error(`Ignoring error during logout (${label})`, e);
|
||||
|
||||
try {
|
||||
watchReset(watcher);
|
||||
} catch (e) {
|
||||
log.error("Ignoring error during logout (FS watch)", e);
|
||||
ignoreError("FS watch", e);
|
||||
}
|
||||
try {
|
||||
clearConvertToMP4Results();
|
||||
} catch (e) {
|
||||
log.error("Ignoring error during logout (convert-to-mp4)", e);
|
||||
ignoreError("convert-to-mp4", e);
|
||||
}
|
||||
try {
|
||||
clearStores();
|
||||
} catch (e) {
|
||||
log.error("Ignoring error during logout (native stores)", e);
|
||||
ignoreError("native stores", e);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ import mlWorkManager from "./machineLearning/mlWorkManager";
|
||||
* See: [Note: Do not throw during logout].
|
||||
*/
|
||||
export const photosLogout = async () => {
|
||||
const ignoreError = (e: unknown, label: string) =>
|
||||
const ignoreError = (label: string, e: unknown) =>
|
||||
log.error(`Ignoring error during logout (${label})`, e);
|
||||
|
||||
await accountLogout();
|
||||
|
||||
@@ -17,7 +17,7 @@ import { logout as remoteLogout } from "../api/user";
|
||||
* gets in an unexpected state.
|
||||
*/
|
||||
export const accountLogout = async () => {
|
||||
const ignoreError = (e: unknown, label: string) =>
|
||||
const ignoreError = (label: string, e: unknown) =>
|
||||
log.error(`Ignoring error during logout (${label})`, e);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user