mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-27 03:58:30 +00:00
Rework how the onboarding notifications task works (#12839)
* Rework how the onboarding notifications task works Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
dd20741b87
commit
02047243f0
@@ -20,9 +20,11 @@ import GenericToast from "../components/views/toasts/GenericToast";
|
||||
import ToastStore from "../stores/ToastStore";
|
||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||
import { getLocalNotificationAccountDataEventType } from "../utils/notifications";
|
||||
import SettingsStore from "../settings/SettingsStore";
|
||||
import { SettingLevel } from "../settings/SettingLevel";
|
||||
|
||||
const onAccept = (): void => {
|
||||
Notifier.setEnabled(true);
|
||||
const onAccept = async (): Promise<void> => {
|
||||
await SettingsStore.setValue("notificationsEnabled", null, SettingLevel.DEVICE, true);
|
||||
const cli = MatrixClientPeg.safeGet();
|
||||
const eventType = getLocalNotificationAccountDataEventType(cli.deviceId!);
|
||||
cli.setAccountData(eventType, {
|
||||
|
||||
Reference in New Issue
Block a user