mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-23 04:56:16 +00:00
Fix profile pinned post UI
This commit is contained in:
parent
eb6050a38f
commit
aab397f2bb
1 changed files with 17 additions and 14 deletions
|
@ -67,9 +67,6 @@ public struct AccountDetailView: View {
|
||||||
case .statuses:
|
case .statuses:
|
||||||
if viewModel.selectedTab == .statuses {
|
if viewModel.selectedTab == .statuses {
|
||||||
pinnedPostsView
|
pinnedPostsView
|
||||||
.listRowInsets(.init())
|
|
||||||
.listRowSeparator(.hidden)
|
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
|
||||||
}
|
}
|
||||||
StatusesListView(fetcher: viewModel)
|
StatusesListView(fetcher: viewModel)
|
||||||
case .followedTags:
|
case .followedTags:
|
||||||
|
@ -78,6 +75,7 @@ public struct AccountDetailView: View {
|
||||||
listsListView
|
listsListView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.environment(\.defaultMinListRowHeight, 1)
|
||||||
.listStyle(.plain)
|
.listStyle(.plain)
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.background(theme.primaryBackgroundColor)
|
.background(theme.primaryBackgroundColor)
|
||||||
|
@ -327,19 +325,24 @@ public struct AccountDetailView: View {
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
private var pinnedPostsView: some View {
|
private var pinnedPostsView: some View {
|
||||||
if !viewModel.pinned.isEmpty {
|
if !viewModel.pinned.isEmpty {
|
||||||
|
Label("account.post.pinned", systemImage: "pin.fill")
|
||||||
|
.font(.scaledFootnote)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
.fontWeight(.semibold)
|
||||||
|
.listRowInsets(.init(top: 0,
|
||||||
|
leading: 12,
|
||||||
|
bottom: 0,
|
||||||
|
trailing: .layoutPadding))
|
||||||
|
.listRowSeparator(.hidden)
|
||||||
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
ForEach(viewModel.pinned) { status in
|
ForEach(viewModel.pinned) { status in
|
||||||
VStack(alignment: .leading) {
|
StatusRowView(viewModel: .init(status: status))
|
||||||
Label("account.post.pinned", systemImage: "pin.fill")
|
|
||||||
.font(.scaledFootnote)
|
|
||||||
.foregroundColor(.gray)
|
|
||||||
.fontWeight(.semibold)
|
|
||||||
StatusRowView(viewModel: .init(status: status))
|
|
||||||
}
|
|
||||||
.padding(.horizontal, .layoutPadding)
|
|
||||||
Rectangle()
|
|
||||||
.frame(height: 12)
|
|
||||||
.foregroundColor(theme.secondaryBackgroundColor)
|
|
||||||
}
|
}
|
||||||
|
Rectangle()
|
||||||
|
.fill(theme.secondaryBackgroundColor)
|
||||||
|
.frame(height: 12)
|
||||||
|
.listRowInsets(.init())
|
||||||
|
.listRowSeparator(.hidden)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue