Boosted status: display avatar

This commit is contained in:
Thomas Ricouard 2022-12-29 07:02:10 +01:00
parent 55409f97db
commit 346345e0c9
2 changed files with 5 additions and 2 deletions

View file

@ -4,7 +4,7 @@ import NukeUI
public struct AvatarView: View {
public enum Size {
case account, status, embed, badge
case account, status, embed, badge, boost
var size: CGSize {
switch self {
@ -16,12 +16,14 @@ public struct AvatarView: View {
return .init(width: 34, height: 34)
case .badge:
return .init(width: 28, height: 28)
case .boost:
return .init(width: 12, height: 12)
}
}
var cornerRadius: CGFloat {
switch self {
case .badge:
case .badge, .boost:
return size.width / 2
default:
return 4

View file

@ -51,6 +51,7 @@ public struct StatusRowView: View {
if viewModel.status.reblog != nil {
HStack(spacing: 2) {
Image(systemName:"arrow.left.arrow.right.circle.fill")
AvatarView(url: viewModel.status.account.avatar, size: .boost)
viewModel.status.account.displayNameWithEmojis
Text("boosted")
}