Merge pull request #5392 from matrix-org/t3chguy/fix/15543
Hide prompt to add email for notifications if 3pid ui feature is off
This commit is contained in:
commit
f583978c42
2 changed files with 7 additions and 6 deletions
|
@ -31,6 +31,7 @@ import SdkConfig from "../../../SdkConfig";
|
|||
import LabelledToggleSwitch from "../elements/LabelledToggleSwitch";
|
||||
import AccessibleButton from "../elements/AccessibleButton";
|
||||
import {SettingLevel} from "../../../settings/SettingLevel";
|
||||
import {UIFeature} from "../../../settings/UIFeature";
|
||||
|
||||
// TODO: this "view" component still has far too much application logic in it,
|
||||
// which should be factored out to other files.
|
||||
|
@ -783,14 +784,14 @@ export default class Notifications extends React.Component {
|
|||
|
||||
const emailThreepids = this.state.threepids.filter((tp) => tp.medium === "email");
|
||||
let emailNotificationsRows;
|
||||
if (emailThreepids.length === 0) {
|
||||
emailNotificationsRows = <div>
|
||||
{ _t('Add an email address to configure email notifications') }
|
||||
</div>;
|
||||
} else {
|
||||
if (emailThreepids.length > 0) {
|
||||
emailNotificationsRows = emailThreepids.map((threePid) => this.emailNotificationsRow(
|
||||
threePid.address, `${_t('Enable email notifications')} (${threePid.address})`,
|
||||
));
|
||||
} else if (SettingsStore.getValue(UIFeature.ThirdPartyID)) {
|
||||
emailNotificationsRows = <div>
|
||||
{ _t('Add an email address to configure email notifications') }
|
||||
</div>;
|
||||
}
|
||||
|
||||
// Build external push rules
|
||||
|
|
|
@ -708,8 +708,8 @@
|
|||
"Enable notifications for this account": "Enable notifications for this account",
|
||||
"Clear notifications": "Clear notifications",
|
||||
"All notifications are currently disabled for all targets.": "All notifications are currently disabled for all targets.",
|
||||
"Add an email address to configure email notifications": "Add an email address to configure email notifications",
|
||||
"Enable email notifications": "Enable email notifications",
|
||||
"Add an email address to configure email notifications": "Add an email address to configure email notifications",
|
||||
"Notifications on the following keywords follow rules which can’t be displayed here:": "Notifications on the following keywords follow rules which can’t be displayed here:",
|
||||
"Unable to fetch notification target list": "Unable to fetch notification target list",
|
||||
"Notification targets": "Notification targets",
|
||||
|
|
Loading…
Reference in a new issue