Feature/4772 add accessibility declaration

This commit is contained in:
JanNiklas Grabowski
2023-06-14 06:14:17 +00:00
committed by Frank Rotermund
parent 42214cad99
commit f8348a66d0
11 changed files with 187 additions and 1 deletions
+26 -1
View File
@@ -216,7 +216,8 @@ typedef NS_ENUM(NSUInteger, ABOUT)
ABOUT_MARK_ALL_AS_READ_INDEX,
ABOUT_CLEAR_CACHE_INDEX,
ABOUT_REPORT_BUG_INDEX,
ABOUT_NETIQUETTE_INDEX
ABOUT_NETIQUETTE_INDEX,
ABOUT_ACCESSIBILITY_DECLARATION_INDEX
};
typedef NS_ENUM(NSUInteger, LABS_ENABLE)
@@ -725,6 +726,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
[sectionAbout addRowWithTag:ABOUT_PRIVACY_INDEX];
}
// bwi 4772 - show accessibility declaration
if (BWIBuildSettings.shared.bwiShowAccessibilityDeclaration) {
[sectionAbout addRowWithTag:ABOUT_ACCESSIBILITY_DECLARATION_INDEX];
}
[sectionAbout addRowWithTag:ABOUT_THIRD_PARTY_INDEX];
sectionAbout.headerTitle = VectorL10n.settingsAbout;
@@ -2837,6 +2842,16 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
cell = privacyPolicyCell;
}
else if (row == ABOUT_ACCESSIBILITY_DECLARATION_INDEX)
{
MXKTableViewCell *accessibilityDeclarationCell = [self getDefaultTableViewCell:tableView];
accessibilityDeclarationCell.textLabel.text = [BWIL10n bwiAccessibilityDeclarationButtonTitle];
[accessibilityDeclarationCell vc_setAccessoryDisclosureIndicatorWithCurrentTheme];
cell = accessibilityDeclarationCell;
}
else if (row == ABOUT_THIRD_PARTY_INDEX)
{
MXKTableViewCell *thirdPartyCell = [self getDefaultTableViewCell:tableView];
@@ -3305,6 +3320,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:BWIBuildSettings.shared.applicationPrivacyPolicyUrlString] options:@{} completionHandler:nil];
}
else if (row == ABOUT_ACCESSIBILITY_DECLARATION_INDEX)
{
[self showAccessibilityDeclaration];
}
else if (row == ABOUT_THIRD_PARTY_INDEX)
{
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"third_party_licenses" ofType:@"html" inDirectory:nil];
@@ -4493,6 +4512,12 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
UIViewController *developerSettingsViewController = [DeveloperSettingsViewController makeViewControllerWithSession:self.mainSession];
[self pushViewController:developerSettingsViewController];
}
- (void)showAccessibilityDeclaration
{
UIViewController *accessibilityDeclarationViewController = [AccessibilityDeclarationViewController makeViewController];
[self pushViewController:accessibilityDeclarationViewController];
}
- (void)showPersonalStateSettings
{