mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Add accessibility identifiers to privacy popups and subviews.
This commit is contained in:
parent
cb5ce42e76
commit
1a80f0c293
|
@ -349,10 +349,12 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
|
|||
case ProfileViewMode_AppSettings:
|
||||
if (self.hasUnsavedChanges) {
|
||||
// If we have a unsaved changes, right item should be a "save" button.
|
||||
self.navigationItem.rightBarButtonItem =
|
||||
UIBarButtonItem *saveButton =
|
||||
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave
|
||||
target:self
|
||||
action:@selector(updatePressed)];
|
||||
SET_SUBVIEW_ACCESSIBILITY_IDENTIFIER(self, saveButton);
|
||||
self.navigationItem.rightBarButtonItem = saveButton;
|
||||
} else {
|
||||
self.navigationItem.rightBarButtonItem = nil;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,10 @@ import Foundation
|
|||
settingsAction.accessibilityIdentifier = "OWSAlerts.\("settings")"
|
||||
alertController.addAction(settingsAction)
|
||||
}
|
||||
CurrentAppContext().frontmostViewController()?.present(alertController, animated: true, completion: nil)
|
||||
CurrentAppContext().frontmostViewController()?.present(alertController, animated: true,
|
||||
completion: {
|
||||
alertController.applyAccessibilityIdentifiers()
|
||||
})
|
||||
}
|
||||
|
||||
@objc
|
||||
|
@ -30,7 +33,10 @@ import Foundation
|
|||
owsFailDebug("frontmostViewController was unexpectedly nil")
|
||||
return
|
||||
}
|
||||
frontmostViewController.present(alert, animated: true, completion: nil)
|
||||
frontmostViewController.present(alert, animated: true,
|
||||
completion: {
|
||||
alert.applyAccessibilityIdentifiers()
|
||||
})
|
||||
}
|
||||
|
||||
@objc
|
||||
|
@ -61,7 +67,10 @@ import Foundation
|
|||
let okAction = UIAlertAction(title: actionTitle, style: .default, handler: buttonAction)
|
||||
okAction.accessibilityIdentifier = "OWSAlerts.\("ok")"
|
||||
alert.addAction(okAction)
|
||||
fromViewController?.present(alert, animated: true, completion: nil)
|
||||
fromViewController?.present(alert, animated: true,
|
||||
completion: {
|
||||
alert.applyAccessibilityIdentifiers()
|
||||
})
|
||||
}
|
||||
|
||||
@objc
|
||||
|
@ -76,7 +85,10 @@ import Foundation
|
|||
okAction.accessibilityIdentifier = "OWSAlerts.\("ok")"
|
||||
alert.addAction(okAction)
|
||||
|
||||
CurrentAppContext().frontmostViewController()?.present(alert, animated: true, completion: nil)
|
||||
CurrentAppContext().frontmostViewController()?.present(alert, animated: true,
|
||||
completion: {
|
||||
alert.applyAccessibilityIdentifiers()
|
||||
})
|
||||
}
|
||||
|
||||
@objc
|
||||
|
|
Loading…
Reference in a new issue