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

View file

@ -140,7 +140,7 @@ public struct StatusRowView: View {
HStack(spacing: 2) {
Image(systemName: "arrow.left.arrow.right.circle.fill")
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)
Text("status.row.was-boosted")
} else {
@ -151,7 +151,7 @@ public struct StatusRowView: View {
.accessibilityLabel(
Text("\(viewModel.status.account.safeDisplayName)")
+ 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)
.foregroundColor(.gray)