mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-22 20:46:21 +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 struct AvatarView: View {
|
||||||
public enum Size {
|
public enum Size {
|
||||||
case account, status, embed, badge
|
case account, status, embed, badge, boost
|
||||||
|
|
||||||
var size: CGSize {
|
var size: CGSize {
|
||||||
switch self {
|
switch self {
|
||||||
|
@ -16,12 +16,14 @@ public struct AvatarView: View {
|
||||||
return .init(width: 34, height: 34)
|
return .init(width: 34, height: 34)
|
||||||
case .badge:
|
case .badge:
|
||||||
return .init(width: 28, height: 28)
|
return .init(width: 28, height: 28)
|
||||||
|
case .boost:
|
||||||
|
return .init(width: 12, height: 12)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var cornerRadius: CGFloat {
|
var cornerRadius: CGFloat {
|
||||||
switch self {
|
switch self {
|
||||||
case .badge:
|
case .badge, .boost:
|
||||||
return size.width / 2
|
return size.width / 2
|
||||||
default:
|
default:
|
||||||
return 4
|
return 4
|
||||||
|
|
|
@ -51,6 +51,7 @@ public struct StatusRowView: View {
|
||||||
if viewModel.status.reblog != nil {
|
if viewModel.status.reblog != nil {
|
||||||
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)
|
||||||
viewModel.status.account.displayNameWithEmojis
|
viewModel.status.account.displayNameWithEmojis
|
||||||
Text("boosted")
|
Text("boosted")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue