NetNewsWire/Multiplatform/Shared/SceneModel.swift

42 lines
815 B
Swift

//
// SceneModel.swift
// NetNewsWire
//
// Created by Maurice Parker on 6/28/20.
// Copyright © 2020 Ranchero Software. All rights reserved.
//
import Foundation
import Account
final class SceneModel: ObservableObject {
var sidebarModel: SidebarModel?
var timelineModel: TimelineModel?
}
// MARK: SidebarModelDelegate
extension SceneModel: SidebarModelDelegate {
func sidebarSelectionDidChange(_: SidebarModel, feeds: [Feed]?) {
print("**** sidebar selection changed ***")
}
func unreadCount(for feed: Feed) -> Int {
// TODO: Get the count from the timeline if Feed is the current timeline
return feed.unreadCount
}
}
// MARK: TimelineModelDelegate
extension SceneModel: TimelineModelDelegate {
func timelineRequestedWebFeedSelection(_: TimelineModel, webFeed: WebFeed) {
}
}