mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Clean up navigation handling for the timeline
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,7 @@ struct TimelineView: View {
|
||||
}.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
}
|
||||
.navigationBarTitle(Text(verbatim: timelineModel.nameForDisplay), displayMode: .inline)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user