Fixed "you boosted" when boosted by same username in different instance (#560)

Fixes #558
This commit is contained in:
Thomas Durand 2023-01-31 12:20:52 +01:00 committed by GitHub
parent 52eff96ab4
commit e512453cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ public struct StatusRowView: View {
HStack(spacing: 2) { HStack(spacing: 2) {
Image(systemName: "arrow.left.arrow.right.circle.fill") Image(systemName: "arrow.left.arrow.right.circle.fill")
AvatarView(url: viewModel.status.account.avatar, size: .boost) AvatarView(url: viewModel.status.account.avatar, size: .boost)
if viewModel.status.account.username != account.account?.username { if viewModel.status.account.url != account.account?.url {
EmojiTextApp(.init(stringValue: viewModel.status.account.safeDisplayName), emojis: viewModel.status.account.emojis) EmojiTextApp(.init(stringValue: viewModel.status.account.safeDisplayName), emojis: viewModel.status.account.emojis)
Text("status.row.was-boosted") Text("status.row.was-boosted")
} else { } else {
@ -151,7 +151,7 @@ public struct StatusRowView: View {
.accessibilityLabel( .accessibilityLabel(
Text("\(viewModel.status.account.safeDisplayName)") Text("\(viewModel.status.account.safeDisplayName)")
+ Text(" ") + Text(" ")
+ Text(viewModel.status.account.username != account.account?.username ? "status.row.was-boosted" : "status.row.you-boosted") + Text(viewModel.status.account.url != account.account?.url ? "status.row.was-boosted" : "status.row.you-boosted")
) )
.font(.scaledFootnote) .font(.scaledFootnote)
.foregroundColor(.gray) .foregroundColor(.gray)