2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2022-12-21 18:41:48 +00:00
|
|
|
export async function markEverDone(): Promise<void> {
|
|
|
|
await window.storage.put('chromiumRegistrationDoneEver', '');
|
2020-02-12 21:30:58 +00:00
|
|
|
}
|
|
|
|
|
2022-12-21 18:41:48 +00:00
|
|
|
export async function markDone(): Promise<void> {
|
|
|
|
await markEverDone();
|
|
|
|
await window.storage.put('chromiumRegistrationDone', '');
|
2020-02-12 21:30:58 +00:00
|
|
|
}
|
|
|
|
|
2020-09-14 21:56:35 +00:00
|
|
|
export async function remove(): Promise<void> {
|
2020-07-24 23:32:08 +00:00
|
|
|
await window.storage.remove('chromiumRegistrationDone');
|
2020-02-12 21:30:58 +00:00
|
|
|
}
|
|
|
|
|
2020-09-14 21:56:35 +00:00
|
|
|
export function isDone(): boolean {
|
2020-02-21 23:08:21 +00:00
|
|
|
return window.storage.get('chromiumRegistrationDone') === '';
|
2020-02-12 21:30:58 +00:00
|
|
|
}
|
|
|
|
|
2020-09-14 21:56:35 +00:00
|
|
|
export function everDone(): boolean {
|
2020-02-21 23:08:21 +00:00
|
|
|
return window.storage.get('chromiumRegistrationDoneEver') === '' || isDone();
|
2020-02-12 21:30:58 +00:00
|
|
|
}
|