mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-25 23:38:06 +00:00
parent
f04c15b8fe
commit
c9e542a2ed
1 changed files with 17 additions and 12 deletions
|
@ -40,15 +40,13 @@ public struct AccountDetailView: View {
|
||||||
public var body: some View {
|
public var body: some View {
|
||||||
ScrollViewReader { proxy in
|
ScrollViewReader { proxy in
|
||||||
List {
|
List {
|
||||||
Group {
|
|
||||||
makeHeaderView(proxy: proxy)
|
makeHeaderView(proxy: proxy)
|
||||||
|
.applyAccountDetailsRowStyle(theme: theme)
|
||||||
.padding(.bottom, -20)
|
.padding(.bottom, -20)
|
||||||
familiarFollowers
|
familiarFollowers
|
||||||
|
.applyAccountDetailsRowStyle(theme: theme)
|
||||||
featuredTagsView
|
featuredTagsView
|
||||||
}
|
.applyAccountDetailsRowStyle(theme: theme)
|
||||||
.listRowInsets(.init())
|
|
||||||
.listRowSeparator(.hidden)
|
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
|
||||||
|
|
||||||
Picker("", selection: $viewModel.selectedTab) {
|
Picker("", selection: $viewModel.selectedTab) {
|
||||||
ForEach(isCurrentUser ? AccountDetailViewModel.Tab.currentAccountTabs : AccountDetailViewModel.Tab.accountTabs,
|
ForEach(isCurrentUser ? AccountDetailViewModel.Tab.currentAccountTabs : AccountDetailViewModel.Tab.accountTabs,
|
||||||
|
@ -59,9 +57,7 @@ public struct AccountDetailView: View {
|
||||||
}
|
}
|
||||||
.pickerStyle(.segmented)
|
.pickerStyle(.segmented)
|
||||||
.padding(.layoutPadding)
|
.padding(.layoutPadding)
|
||||||
.listRowSeparator(.hidden)
|
.applyAccountDetailsRowStyle(theme: theme)
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
|
||||||
.listRowInsets(.init())
|
|
||||||
.id("status")
|
.id("status")
|
||||||
|
|
||||||
switch viewModel.tabState {
|
switch viewModel.tabState {
|
||||||
|
@ -487,6 +483,15 @@ public struct AccountDetailView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension View {
|
||||||
|
func applyAccountDetailsRowStyle(theme: Theme) -> some View {
|
||||||
|
self
|
||||||
|
.listRowInsets(.init())
|
||||||
|
.listRowSeparator(.hidden)
|
||||||
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct AccountDetailView_Previews: PreviewProvider {
|
struct AccountDetailView_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
AccountDetailView(account: .placeholder())
|
AccountDetailView(account: .placeholder())
|
||||||
|
|
Loading…
Reference in a new issue