mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
remove compact home feed view struct
This commit is contained in:
parent
5478608502
commit
f6b0eb667d
2 changed files with 17 additions and 25 deletions
|
|
@ -7,30 +7,6 @@ import Utils
|
|||
import Views
|
||||
|
||||
#if os(iOS)
|
||||
struct CompactHomeView: View {
|
||||
@ObservedObject var viewModel: HomeFeedViewModel
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
HomeFeedContainerView(isCompact: true, viewModel: viewModel)
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
NavigationLink(
|
||||
destination: { ProfileView() },
|
||||
label: {
|
||||
Image.profile
|
||||
.resizable()
|
||||
.frame(width: 26, height: 26)
|
||||
.padding()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
.accentColor(.appGrayTextContrast)
|
||||
}
|
||||
}
|
||||
|
||||
struct HomeFeedContainerView: View {
|
||||
let isCompact: Bool
|
||||
@EnvironmentObject var dataService: DataService
|
||||
|
|
|
|||
|
|
@ -6,7 +6,23 @@ struct HomeView: View {
|
|||
var body: some View {
|
||||
#if os(iOS)
|
||||
if UIDevice.isIPhone {
|
||||
CompactHomeView(viewModel: viewModel)
|
||||
NavigationView {
|
||||
HomeFeedContainerView(isCompact: true, viewModel: viewModel)
|
||||
.toolbar {
|
||||
ToolbarItem {
|
||||
NavigationLink(
|
||||
destination: { ProfileView() },
|
||||
label: {
|
||||
Image.profile
|
||||
.resizable()
|
||||
.frame(width: 26, height: 26)
|
||||
.padding()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
.accentColor(.appGrayTextContrast)
|
||||
} else {
|
||||
HomeFeedContainerView(isCompact: false, viewModel: viewModel)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue