Clean up navigation handling for the timeline

This commit is contained in:
Maurice Parker
2020-07-13 11:37:21 -05:00
parent 17e1247ff0
commit c29960ddda
4 changed files with 1 additions and 30 deletions

View File

@@ -18,7 +18,6 @@ struct TimelineContainerView: View {
@ViewBuilder var body: some View {
if let feeds = feeds {
TimelineView()
.modifier(TimelineTitleModifier(title: sceneModel.timelineModel.nameForDisplay))
.modifier(TimelineToolbarModifier())
.environmentObject(sceneModel.timelineModel)
.onAppear {

View File

@@ -1,23 +0,0 @@
//
// TimelineTitleModifier.swift
// NetNewsWire
//
// Created by Maurice Parker on 7/6/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import SwiftUI
struct TimelineTitleModifier: ViewModifier {
var title: String
func body(content: Content) -> some View {
#if os(macOS)
return content
#endif
#if os(iOS)
return content.navigationBarTitle(Text(verbatim: title), displayMode: .inline)
#endif
}
}

View File

@@ -59,6 +59,7 @@ struct TimelineView: View {
}.buttonStyle(PlainButtonStyle())
}
}
.navigationBarTitle(Text(verbatim: timelineModel.nameForDisplay), displayMode: .inline)
#endif
}