Snooze the bulk unverified sessions reminder on dismiss (#9706)

* test bulk unverified sessions toast behaviour

* unverified sessions toast text tweak

* only show bulk unverified sessions toast when current device is verified

* add Setting for BulkUnverifiedSessionsReminder

* add build config for BulkUnverifiedSessionsReminder

* add more assertions for show/hide toast, fix strict errors

* fix strict error

* add util methods for snoozing in local storage

* rename nag to reminder

* set and read snooze for toast

* test snooze

* remove debug

* strict fix

* remove unused code
This commit is contained in:
Kerry 2022-12-06 19:18:03 +13:00 committed by GitHub
parent 75c2c1a572
commit 82ad8d5aa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 167 additions and 0 deletions

View file

@ -20,6 +20,7 @@ import DeviceListener from '../DeviceListener';
import GenericToast from "../components/views/toasts/GenericToast";
import ToastStore from "../stores/ToastStore";
import { Action } from "../dispatcher/actions";
import { snoozeBulkUnverifiedDeviceReminder } from '../utils/device/snoozeBulkUnverifiedDeviceReminder';
const TOAST_KEY = "reviewsessions";
@ -34,6 +35,7 @@ export const showToast = (deviceIds: Set<string>) => {
const onReject = () => {
DeviceListener.sharedInstance().dismissUnverifiedSessions(deviceIds);
snoozeBulkUnverifiedDeviceReminder();
};
ToastStore.sharedInstance().addOrReplaceToast({