IOS-71: Read persons account name when going through statuses (#974)

This commit is contained in:
Marcus Kida 2023-03-16 09:06:14 +01:00 committed by GitHub
parent bb15e16959
commit f6f90bda9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -727,23 +727,27 @@ extension StatusView.ViewModel {
} }
private func bindAccessibility(statusView: StatusView) { private func bindAccessibility(statusView: StatusView) {
let shortAuthorAccessibilityLabel = Publishers.CombineLatest3( let shortAuthorAccessibilityLabel = Publishers.CombineLatest4(
$header, $header,
$authorName, $authorName,
$authorUsername,
$timestampText $timestampText
) )
.map { header, authorName, timestamp -> String? in .map { header, authorName, authorUsername, timestamp -> String? in
var strings: [String?] = [] var strings: [String?] = []
switch header { switch header {
case .none: case .none:
strings.append(authorName?.string) strings.append(authorName?.string)
strings.append(authorUsername)
case .reply(let info): case .reply(let info):
strings.append(authorName?.string) strings.append(authorName?.string)
strings.append(authorUsername)
strings.append(info.header.string) strings.append(info.header.string)
case .repost(let info): case .repost(let info):
strings.append(info.header.string) strings.append(info.header.string)
strings.append(authorName?.string) strings.append(authorName?.string)
strings.append(authorUsername)
} }
if statusView.style != .editHistory { if statusView.style != .editHistory {