From 2088d0196956a9321f1dc2afaf82125bd1775a90 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 15 May 2024 10:43:24 +0300 Subject: Regular size layout --- JuickNext/View/FeedView.swift | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'JuickNext/View/FeedView.swift') diff --git a/JuickNext/View/FeedView.swift b/JuickNext/View/FeedView.swift index 3a612e8..cd0569f 100644 --- a/JuickNext/View/FeedView.swift +++ b/JuickNext/View/FeedView.swift @@ -11,11 +11,11 @@ import SwiftUI struct FeedView: View { @ObservedObject var messageFetcher : MessageFetcher - let title: String + let feed: Feed - init(_ title: String, url: String) { - self.title = title - messageFetcher = MessageFetcher(url: url) + init(_ feed: Feed) { + self.feed = feed + messageFetcher = MessageFetcher(url: feed.url) } private var stateContent: AnyView { @@ -38,13 +38,11 @@ struct FeedView: View { } var body: some View { - NavigationView { - VStack { - stateContent - }.toolbar { - ToolbarItem(placement: .principal) { - Text(title) - } + VStack { + stateContent + }.toolbar { + ToolbarItem(placement: .principal) { + Text(feed.title) } } } @@ -52,6 +50,6 @@ struct FeedView: View { struct FeedView_Previews: PreviewProvider { static var previews: some View { - FeedView("Discover", url: "https://api.juick.com/messages") + FeedView(Feed(title:"Discover", url: "https://api.juick.com/messages")) } } -- cgit v1.2.3