Merge pull request #5405 from vector-im/langleyd/5404_add_build_setting_to_hide_social_login

Add build setting to hide social login
This commit is contained in:
David Langley 2022-01-19 09:20:18 +00:00 committed by GitHub
commit 1200dd967f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -350,6 +350,7 @@ final class BuildSettings: NSObject {
static let authScreenShowPhoneNumber = true
static let authScreenShowForgotPassword = true
static let authScreenShowCustomServerOptions = true
static let authScreenShowSocialLoginSection = true
// MARK: - Unified Search
static let unifiedSearchScreenShowPublicDirectory = true

View file

@ -482,7 +482,8 @@ static const CGFloat kAuthInputContainerViewMinHeightConstraintConstant = 150.0;
// Hide input view when there is only social login actions to present
if ((self.authType == MXKAuthenticationTypeLogin || self.authType == MXKAuthenticationTypeRegister)
&& self.currentLoginSSOFlow
&& !self.isAuthSessionContainsPasswordFlow)
&& !self.isAuthSessionContainsPasswordFlow
&& BuildSettings.authScreenShowSocialLoginSection)
{
hideAuthInputView = YES;
}
@ -1735,8 +1736,8 @@ static const CGFloat kAuthInputContainerViewMinHeightConstraintConstant = 150.0;
- (void)updateSocialLoginViewVisibility
{
SocialLoginButtonMode socialLoginButtonMode = SocialLoginButtonModeContinue;
BOOL showSocialLoginView = self.currentLoginSSOFlow ? YES : NO;
BOOL showSocialLoginView = BuildSettings.authScreenShowSocialLoginSection && (self.currentLoginSSOFlow ? YES : NO);
switch (self.authType)
{

1
changelog.d/5404.bugfix Normal file
View file

@ -0,0 +1 @@
Add BuildSetting to hide social login in favour of the simple SSO button.