Updating read status accessibility ids

pull/797/head
Emily 2 years ago
parent b22e303d40
commit 361fa407d5

@ -46,14 +46,17 @@ extension ContextMenuVC {
static func copy(_ cellViewModel: MessageViewModel, _ delegate: ContextMenuActionDelegate?) -> Action {
return Action(
icon: UIImage(named: "ic_copy"),
title: "copy".localized()
title: "copy".localized(),
accessibilityLabel: "Copy text"
) { delegate?.copy(cellViewModel) }
}
static func copySessionID(_ cellViewModel: MessageViewModel, _ delegate: ContextMenuActionDelegate?) -> Action {
return Action(
icon: UIImage(named: "ic_copy"),
title: "vc_conversation_settings_copy_session_id_button_title".localized()
title: "vc_conversation_settings_copy_session_id_button_title".localized(),
accessibilityLabel: "Copy Session ID"
) { delegate?.copySessionID(cellViewModel) }
}
@ -76,14 +79,16 @@ extension ContextMenuVC {
static func ban(_ cellViewModel: MessageViewModel, _ delegate: ContextMenuActionDelegate?) -> Action {
return Action(
icon: UIImage(named: "ic_block"),
title: "context_menu_ban_user".localized()
title: "context_menu_ban_user".localized(),
accessibilityLabel: "Ban user"
) { delegate?.ban(cellViewModel) }
}
static func banAndDeleteAllMessages(_ cellViewModel: MessageViewModel, _ delegate: ContextMenuActionDelegate?) -> Action {
return Action(
icon: UIImage(named: "ic_block"),
title: "context_menu_ban_and_delete_all".localized()
title: "context_menu_ban_and_delete_all".localized(),
accessibilityLabel: "Ban user and delete"
) { delegate?.banAndDeleteAllMessages(cellViewModel) }
}
@ -96,7 +101,8 @@ extension ContextMenuVC {
static func emojiPlusButton(_ cellViewModel: MessageViewModel, _ delegate: ContextMenuActionDelegate?) -> Action {
return Action(
isEmojiPlus: true
isEmojiPlus: true,
accessibilityLabel: "Add emoji"
) { delegate?.showFullEmojiKeyboard(cellViewModel) }
}

@ -422,7 +422,7 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate {
messageStatusLabel.text = statusText
messageStatusLabel.themeTextColor = tintColor
messageStatusImageView.image = image
messageStatusImageView.accessibilityIdentifier = "Message sent status: \(statusText)"
messageStatusLabel.accessibilityIdentifier = "Message sent status: \(statusText ?? "invalid")"
messageStatusImageView.themeTintColor = tintColor
messageStatusContainerView.isHidden = (
cellViewModel.variant != .standardOutgoing ||
@ -765,15 +765,15 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate {
// MARK: - Interaction
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
if let bodyTappableLabel = bodyTappableLabel {
let btIngetBodyTappableLabelCoordinates = convert(point, to: bodyTappableLabel)
if bodyTappableLabel.bounds.contains(btIngetBodyTappableLabelCoordinates) {
return bodyTappableLabel
}
}
return super.hitTest(point, with: event)
}
// override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
// if let bodyTappableLabel = bodyTappableLabel {
// let btIngetBodyTappableLabelCoordinates = convert(point, to: bodyTappableLabel)
// if bodyTappableLabel.bounds.contains(btIngetBodyTappableLabelCoordinates) {
// return bodyTappableLabel
// }
// }
// return super.hitTest(point, with: event)
// }
override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true // Needed for the pan gesture recognizer to work with the table view's pan gesture recognizer

Loading…
Cancel
Save