This commit is contained in:
Stuart Breckenridge 2020-08-12 18:12:21 +08:00
parent 6be14a099b
commit 646a3190e5
No known key found for this signature in database
GPG Key ID: 79BD673276AE83CE

View File

@ -12,6 +12,10 @@ struct TimelineToolbarModifier: ViewModifier {
@EnvironmentObject private var sceneModel: SceneModel
@EnvironmentObject private var timelineModel: TimelineModel
@Environment(\.presentationMode) var presentationMode
#if os(iOS)
@Environment(\.horizontalSizeClass) private var horizontalSizeClass
#endif
@State private var isReadFiltered: Bool? = nil
func body(content: Content) -> some View {
@ -40,6 +44,11 @@ struct TimelineToolbarModifier: ViewModifier {
ToolbarItem(placement: .bottomBar) {
Button {
sceneModel.markAllAsRead()
#if os(iOS)
if horizontalSizeClass == .compact {
presentationMode.wrappedValue.dismiss()
}
#endif
} label: {
AppAssets.markAllAsReadImage
}