Add unlink step to existing UI flow
This commit is contained in:
parent
38f532cdda
commit
09bd95228d
2 changed files with 28 additions and 0 deletions
|
@ -7,6 +7,17 @@ import { deleteAllLogs } from '../util/deleteAllLogs';
|
|||
import * as Errors from '../types/errors';
|
||||
|
||||
export async function deleteAllData(): Promise<void> {
|
||||
try {
|
||||
// This might fail if websocket closes before we receive the response, while
|
||||
// still unlinking the device on the server.
|
||||
await window.textsecure.server?.unlink();
|
||||
} catch (error) {
|
||||
log.error(
|
||||
'Something went wrong unlinking device:',
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
await deleteAllLogs();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue