2020-06-30 18:03:33 +02:00
|
|
|
//
|
|
|
|
// TimelineView.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/30/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct TimelineView: View {
|
2020-07-01 18:13:11 +02:00
|
|
|
|
|
|
|
@EnvironmentObject private var timelineModel: TimelineModel
|
|
|
|
|
|
|
|
var body: some View {
|
2020-07-03 00:36:50 +02:00
|
|
|
List(timelineModel.timelineItems) { timelineItem in
|
2020-07-06 02:21:23 +02:00
|
|
|
ZStack {
|
2020-07-06 01:53:18 +02:00
|
|
|
TimelineItemView(timelineItem: timelineItem)
|
|
|
|
.onAppear {
|
|
|
|
timelineModel.loadMoreTimelineItemsIfNecessary(timelineItem)
|
|
|
|
}
|
2020-07-06 02:21:23 +02:00
|
|
|
NavigationLink(destination: (ArticleContainerView(article: timelineItem.article))) {
|
|
|
|
EmptyView()
|
|
|
|
}.buttonStyle(PlainButtonStyle())
|
2020-07-06 01:53:18 +02:00
|
|
|
}
|
2020-07-01 19:30:55 +02:00
|
|
|
}
|
2020-06-30 18:03:33 +02:00
|
|
|
}
|
2020-07-01 19:30:55 +02:00
|
|
|
|
|
|
|
// var body: some View {
|
|
|
|
// List(timelineModel.timelineItems) { timelineItem in
|
|
|
|
// TimelineItemView(timelineItem: timelineItem)
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
2020-06-30 18:03:33 +02:00
|
|
|
}
|