mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-18 05:39:15 +01:00
18 lines
523 B
TypeScript
18 lines
523 B
TypeScript
// Copyright 2018 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { ipcRenderer } from 'electron';
|
|
import pTimeout from 'p-timeout';
|
|
|
|
import { beforeRestart } from '../logging/set_up_renderer_logging.preload.ts';
|
|
import * as durations from './durations/index.std.ts';
|
|
|
|
export function deleteAllLogs(): Promise<void> {
|
|
// Restart logging again when the file stream close
|
|
beforeRestart();
|
|
|
|
return pTimeout(ipcRenderer.invoke('delete-all-logs'), {
|
|
milliseconds: 5 * durations.SECOND,
|
|
});
|
|
}
|