mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +00:00
More optimizations to StatusRowView
This commit is contained in:
parent
013410a80e
commit
5b7bfba444
2 changed files with 3 additions and 10 deletions
|
@ -6,7 +6,6 @@ import SwiftUI
|
|||
|
||||
public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var routerPath: RouterPath
|
||||
|
||||
@ObservedObject private var fetcher: Fetcher
|
||||
private let isRemote: Bool
|
||||
|
@ -25,7 +24,6 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
|
|||
StatusRowView(viewModel: .init(status: status, isCompact: false))
|
||||
.padding(.horizontal, isEmbdedInList ? 0 : .layoutPadding)
|
||||
.redacted(reason: .placeholder)
|
||||
.id(UUID())
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
.listRowInsets(.init(top: 12,
|
||||
leading: .layoutPadding,
|
||||
|
|
|
@ -9,7 +9,6 @@ import SwiftUI
|
|||
public struct StatusRowView: View {
|
||||
@Environment(\.redactionReasons) private var reasons
|
||||
@EnvironmentObject private var preferences: UserPreferences
|
||||
@EnvironmentObject private var account: CurrentAccount
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var client: Client
|
||||
@EnvironmentObject private var routerPath: RouterPath
|
||||
|
@ -169,18 +168,14 @@ 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.url != account.account?.url {
|
||||
EmojiTextApp(.init(stringValue: viewModel.status.account.safeDisplayName), emojis: viewModel.status.account.emojis)
|
||||
Text("status.row.was-boosted")
|
||||
} else {
|
||||
Text("status.row.you-boosted")
|
||||
}
|
||||
EmojiTextApp(.init(stringValue: viewModel.status.account.safeDisplayName), emojis: viewModel.status.account.emojis)
|
||||
Text("status.row.was-boosted")
|
||||
}
|
||||
.accessibilityElement()
|
||||
.accessibilityLabel(
|
||||
Text("\(viewModel.status.account.safeDisplayName)")
|
||||
+ Text(" ")
|
||||
+ Text(viewModel.status.account.url != account.account?.url ? "status.row.was-boosted" : "status.row.you-boosted")
|
||||
+ Text("status.row.was-boosted")
|
||||
)
|
||||
.font(.scaledFootnote)
|
||||
.foregroundColor(.gray)
|
||||
|
|
Loading…
Reference in a new issue