Fixes for bluesky bridge support
This commit is contained in:
parent
e33dcdf372
commit
a97868cab7
|
@ -125,7 +125,7 @@ struct AccountDetailHeaderView: View {
|
|||
scrollViewProxy?.scrollTo("status", anchor: .top)
|
||||
}
|
||||
} label: {
|
||||
makeCustomInfoLabel(title: "account.posts", count: account.statusesCount)
|
||||
makeCustomInfoLabel(title: "account.posts", count: account.statusesCount ?? 0)
|
||||
}
|
||||
.accessibilityHint("accessibility.tabs.profile.post-count.hint")
|
||||
.buttonStyle(.borderless)
|
||||
|
@ -133,7 +133,7 @@ struct AccountDetailHeaderView: View {
|
|||
Button {
|
||||
routerPath.navigate(to: .following(id: account.id))
|
||||
} label: {
|
||||
makeCustomInfoLabel(title: "account.following", count: account.followingCount)
|
||||
makeCustomInfoLabel(title: "account.following", count: account.followingCount ?? 0)
|
||||
}
|
||||
.accessibilityHint("accessibility.tabs.profile.following-count.hint")
|
||||
.buttonStyle(.borderless)
|
||||
|
@ -143,7 +143,7 @@ struct AccountDetailHeaderView: View {
|
|||
} label: {
|
||||
makeCustomInfoLabel(
|
||||
title: "account.followers",
|
||||
count: account.followersCount,
|
||||
count: account.followersCount ?? 0,
|
||||
needsBadge: currentAccount.account?.id == account.id && !currentAccount.followRequests.isEmpty
|
||||
)
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public struct AccountsListRow: View {
|
|||
|
||||
// First parameter is the number for the plural
|
||||
// Second parameter is the formatted string to show
|
||||
Text("account.label.followers \(viewModel.account.followersCount) \(viewModel.account.followersCount, format: .number.notation(.compactName))")
|
||||
Text("account.label.followers \(viewModel.account.followersCount ?? 0) \(viewModel.account.followersCount ?? 0, format: .number.notation(.compactName))")
|
||||
.font(.scaledFootnote)
|
||||
|
||||
if let field = viewModel.account.fields.filter({ $0.verifiedAt != nil }).first {
|
||||
|
|
|
@ -47,9 +47,9 @@ public final class Account: Codable, Identifiable, Hashable, Sendable, Equatable
|
|||
public let acct: String
|
||||
public let note: HTMLString
|
||||
public let createdAt: ServerDate
|
||||
public let followersCount: Int
|
||||
public let followingCount: Int
|
||||
public let statusesCount: Int
|
||||
public let followersCount: Int?
|
||||
public let followingCount: Int?
|
||||
public let statusesCount: Int?
|
||||
public let lastStatusAt: String?
|
||||
public let fields: [Field]
|
||||
public let locked: Bool
|
||||
|
|
Loading…
Reference in New Issue