From b21e5ba10b313ebc492b2241d808f917814a5706 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 22 May 2020 12:57:48 +0100 Subject: [PATCH] Set new granular priorities Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/DeviceListener.ts | 6 +++++- src/components/structures/MatrixChat.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/DeviceListener.ts b/src/DeviceListener.ts index ce1f781dad..1ecaca9b40 100644 --- a/src/DeviceListener.ts +++ b/src/DeviceListener.ts @@ -197,6 +197,7 @@ export default class DeviceListener { icon: "verification_warning", props: {kind: 'verify_this_session'}, component: sdk.getComponent("toasts.SetupEncryptionToast"), + priority: 95, }); } else { const backupInfo = await this._getKeyBackupInfo(); @@ -208,6 +209,7 @@ export default class DeviceListener { icon: "verification_warning", props: {kind: 'upgrade_encryption'}, component: sdk.getComponent("toasts.SetupEncryptionToast"), + priority: 40, }); } else { // No cross-signing or key backup on account (set up encryption) @@ -217,6 +219,7 @@ export default class DeviceListener { icon: "verification_warning", props: {kind: 'set_up_encryption'}, component: sdk.getComponent("toasts.SetupEncryptionToast"), + priority: 40, }); } } @@ -262,11 +265,11 @@ export default class DeviceListener { key: OTHER_DEVICES_TOAST_KEY, title: _t("Review where you’re logged in"), icon: "verification_warning", - priority: ToastStore.PRIORITY_LOW, props: { deviceIds: oldUnverifiedDeviceIds, }, component: sdk.getComponent("toasts.BulkUnverifiedSessionsToast"), + priority: 50, }); } else { ToastStore.sharedInstance().dismissToast(OTHER_DEVICES_TOAST_KEY); @@ -280,6 +283,7 @@ export default class DeviceListener { icon: "verification_warning", props: { deviceId }, component: sdk.getComponent("toasts.UnverifiedSessionToast"), + priority: 80, }); } diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 89db30c7b4..e6a56c683f 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1559,7 +1559,7 @@ export default class MatrixChat extends React.PureComponent { icon: "verification", props: {request}, component: sdk.getComponent("toasts.VerificationRequestToast"), - priority: 95, + priority: 90, }); } });