mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-12 17:36:19 +01:00
33 lines
702 B
Swift
33 lines
702 B
Swift
//
|
|
// TimelineContainerView.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Maurice Parker on 6/30/20.
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Account
|
|
|
|
struct TimelineContainerView: View {
|
|
|
|
@Environment(\.undoManager) var undoManager
|
|
@EnvironmentObject private var sceneModel: SceneModel
|
|
var feeds: [Feed]? = nil
|
|
|
|
@ViewBuilder var body: some View {
|
|
if let feeds = feeds {
|
|
TimelineView()
|
|
.modifier(TimelineToolbarModifier())
|
|
.environmentObject(sceneModel.timelineModel)
|
|
.onAppear {
|
|
sceneModel.timelineModel.undoManager = undoManager
|
|
sceneModel.timelineModel.fetchArticles(feeds: feeds)
|
|
}
|
|
} else {
|
|
EmptyView()
|
|
}
|
|
}
|
|
|
|
}
|