Add accessibility ids to conversation view cells.

This commit is contained in:
Matthew Chen 2019-06-26 16:01:33 -04:00
parent 158cf4e395
commit 32a76da0bb

View File

@ -4600,7 +4600,9 @@ typedef enum : NSUInteger {
// TODO: Confirm with nancy if this will work.
NSString *cellName = [NSString stringWithFormat:@"interaction.%@", NSUUID.UUID.UUIDString];
if (viewItem.displayableBodyText.displayText.length > 0) {
cellName = [NSString stringWithFormat:@"message.text.%@", viewItem.displayableBodyText.displayText];
NSString *textForId =
[viewItem.displayableBodyText.displayText stringByReplacingOccurrencesOfString:@" " withString:@"_"];
cellName = [NSString stringWithFormat:@"message.text.%@", textForId];
} else if (viewItem.stickerInfo) {
cellName = [NSString stringWithFormat:@"message.sticker.%@", [viewItem.stickerInfo asKey]];
}