Set new granular priorities

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-05-22 12:57:48 +01:00
parent 3bf5e003a1
commit b21e5ba10b
2 changed files with 6 additions and 2 deletions

View file

@ -197,6 +197,7 @@ export default class DeviceListener {
icon: "verification_warning", icon: "verification_warning",
props: {kind: 'verify_this_session'}, props: {kind: 'verify_this_session'},
component: sdk.getComponent("toasts.SetupEncryptionToast"), component: sdk.getComponent("toasts.SetupEncryptionToast"),
priority: 95,
}); });
} else { } else {
const backupInfo = await this._getKeyBackupInfo(); const backupInfo = await this._getKeyBackupInfo();
@ -208,6 +209,7 @@ export default class DeviceListener {
icon: "verification_warning", icon: "verification_warning",
props: {kind: 'upgrade_encryption'}, props: {kind: 'upgrade_encryption'},
component: sdk.getComponent("toasts.SetupEncryptionToast"), component: sdk.getComponent("toasts.SetupEncryptionToast"),
priority: 40,
}); });
} else { } else {
// No cross-signing or key backup on account (set up encryption) // No cross-signing or key backup on account (set up encryption)
@ -217,6 +219,7 @@ export default class DeviceListener {
icon: "verification_warning", icon: "verification_warning",
props: {kind: 'set_up_encryption'}, props: {kind: 'set_up_encryption'},
component: sdk.getComponent("toasts.SetupEncryptionToast"), component: sdk.getComponent("toasts.SetupEncryptionToast"),
priority: 40,
}); });
} }
} }
@ -262,11 +265,11 @@ export default class DeviceListener {
key: OTHER_DEVICES_TOAST_KEY, key: OTHER_DEVICES_TOAST_KEY,
title: _t("Review where youre logged in"), title: _t("Review where youre logged in"),
icon: "verification_warning", icon: "verification_warning",
priority: ToastStore.PRIORITY_LOW,
props: { props: {
deviceIds: oldUnverifiedDeviceIds, deviceIds: oldUnverifiedDeviceIds,
}, },
component: sdk.getComponent("toasts.BulkUnverifiedSessionsToast"), component: sdk.getComponent("toasts.BulkUnverifiedSessionsToast"),
priority: 50,
}); });
} else { } else {
ToastStore.sharedInstance().dismissToast(OTHER_DEVICES_TOAST_KEY); ToastStore.sharedInstance().dismissToast(OTHER_DEVICES_TOAST_KEY);
@ -280,6 +283,7 @@ export default class DeviceListener {
icon: "verification_warning", icon: "verification_warning",
props: { deviceId }, props: { deviceId },
component: sdk.getComponent("toasts.UnverifiedSessionToast"), component: sdk.getComponent("toasts.UnverifiedSessionToast"),
priority: 80,
}); });
} }

View file

@ -1559,7 +1559,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
icon: "verification", icon: "verification",
props: {request}, props: {request},
component: sdk.getComponent("toasts.VerificationRequestToast"), component: sdk.getComponent("toasts.VerificationRequestToast"),
priority: 95, priority: 90,
}); });
} }
}); });