mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
23 lines
627 B
TypeScript
23 lines
627 B
TypeScript
import { Storage } from './storage';
|
|
|
|
async function markEverDone() {
|
|
await Storage.put('chromiumRegistrationDoneEver', '');
|
|
}
|
|
async function markDone() {
|
|
await markEverDone();
|
|
await Storage.put('chromiumRegistrationDone', '');
|
|
}
|
|
function isDone() {
|
|
return Storage.get('chromiumRegistrationDone') === '';
|
|
}
|
|
function everDone() {
|
|
return (
|
|
Storage.get('chromiumRegistrationDoneEver') === '' ||
|
|
Storage.get('chromiumRegistrationDone') === ''
|
|
);
|
|
}
|
|
async function remove() {
|
|
await Storage.remove('chromiumRegistrationDone');
|
|
}
|
|
|
|
export const Registration = { markEverDone, markDone, isDone, everDone, remove };
|