From f2bf132d6df251ea7d5224d0d86c2ca5b0c02320 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 15 May 2024 09:38:05 +0300 Subject: Integrate feeds from good old `tst` 2019 project --- JuickNext/View/ContentView.swift | 13 +++++++++---- JuickNext/View/Discussions.swift | 21 --------------------- JuickNext/View/Today.swift | 24 ------------------------ 3 files changed, 9 insertions(+), 49 deletions(-) delete mode 100644 JuickNext/View/Discussions.swift delete mode 100644 JuickNext/View/Today.swift (limited to 'JuickNext/View') diff --git a/JuickNext/View/ContentView.swift b/JuickNext/View/ContentView.swift index e77d6e7..22e74e0 100644 --- a/JuickNext/View/ContentView.swift +++ b/JuickNext/View/ContentView.swift @@ -10,17 +10,22 @@ import SwiftUI struct ContentView: View { @Environment(\.horizontalSizeClass) private var size + + let today = FeedView("Today", url: "https://api.juick.com/messages?popular=1") + let discussions = FeedView("Discussions", url: "https://api.juick.com/messages/discussions") + let discover = FeedView("Discover", url: "https://api.juick.com/messages") var body: some View { let view = (size == .compact) ? AnyView(TabView { - Today() - .tabItem { + today.tabItem { Image("ei-clock") } - Discussions() - .tabItem { + discussions.tabItem { Image("ei-bell") } + discover.tabItem { + Image("Discover") + } }): AnyView(NavigationView { VStack { Text("Discussions") diff --git a/JuickNext/View/Discussions.swift b/JuickNext/View/Discussions.swift deleted file mode 100644 index 20e7fa8..0000000 --- a/JuickNext/View/Discussions.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Discussions.swift -// Juick -// -// Created by Vitaly Takmazov on 14.05.2023. -// Copyright © 2023 com.juick. All rights reserved. -// - -import SwiftUI - -struct Discussions: View { - var body: some View { - Text("Discussions") - } -} - -struct Discussions_Previews: PreviewProvider { - static var previews: some View { - Discussions() - } -} diff --git a/JuickNext/View/Today.swift b/JuickNext/View/Today.swift deleted file mode 100644 index 161a353..0000000 --- a/JuickNext/View/Today.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// TodayView.swift -// Juick -// -// Created by Vitaly Takmazov on 14.05.2023. -// Copyright © 2023 com.juick. All rights reserved. -// - -import SwiftUI - -struct Today: View { - let title = "Today" - var body: some View { - NavigationView { - Text(title) - } - } -} - -struct Today_Previews: PreviewProvider { - static var previews: some View { - Today() - } -} -- cgit v1.2.3