2020-06-28 21:21:43 +02:00
|
|
|
//
|
|
|
|
// SceneModel.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/28/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2020-06-29 00:43:20 +02:00
|
|
|
import Account
|
2020-06-28 21:21:43 +02:00
|
|
|
|
|
|
|
final class SceneModel: ObservableObject {
|
|
|
|
|
|
|
|
var sidebarModel: SidebarModel?
|
2020-06-30 18:03:33 +02:00
|
|
|
var timelineModel: TimelineModel?
|
2020-07-02 22:30:50 +02:00
|
|
|
var articleModel: ArticleModel?
|
2020-06-28 21:21:43 +02:00
|
|
|
|
|
|
|
}
|
2020-06-29 00:43:20 +02:00
|
|
|
|
|
|
|
// MARK: SidebarModelDelegate
|
|
|
|
|
|
|
|
extension SceneModel: SidebarModelDelegate {
|
|
|
|
|
2020-06-29 13:16:48 +02:00
|
|
|
func unreadCount(for feed: Feed) -> Int {
|
|
|
|
// TODO: Get the count from the timeline if Feed is the current timeline
|
|
|
|
return feed.unreadCount
|
|
|
|
}
|
|
|
|
|
2020-06-29 00:43:20 +02:00
|
|
|
}
|
2020-06-30 18:03:33 +02:00
|
|
|
|
|
|
|
// MARK: TimelineModelDelegate
|
|
|
|
|
|
|
|
extension SceneModel: TimelineModelDelegate {
|
|
|
|
|
|
|
|
func timelineRequestedWebFeedSelection(_: TimelineModel, webFeed: WebFeed) {
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2020-07-02 22:30:50 +02:00
|
|
|
|
|
|
|
// MARK: ArticleModelDelegate
|
|
|
|
|
|
|
|
extension SceneModel: ArticleModelDelegate {
|
|
|
|
|
|
|
|
|
|
|
|
}
|