Merge pull request #7655 from vector-im/mauroromito/hide_email_according_to_3pid_changes

Hide Add Email UI according to the 3 pid changes capability
This commit is contained in:
Mauro
2023-08-25 09:24:58 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
@@ -365,7 +365,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
[sectionUserSettings addRowWithTag: USER_SETTINGS_PHONENUMBERS_OFFSET + index];
}
if (BuildSettings.settingsScreenAllowAddingEmailThreepids)
if (BuildSettings.settingsScreenAllowAddingEmailThreepids &&
// If the threePidChanges is nil we assume the capability to be true
(!self.mainSession.homeserverCapabilities.threePidChanges ||
self.mainSession.homeserverCapabilities.threePidChanges.enabled))
{
[sectionUserSettings addRowWithTag:USER_SETTINGS_ADD_EMAIL_INDEX];
}