mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-22 12:36:17 +00:00
Boosted status: display avatar
This commit is contained in:
parent
55409f97db
commit
346345e0c9
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue