2017-11-19 15:40:02 -08:00
|
|
|
//
|
|
|
|
// TodayFeedDelegate.swift
|
2018-08-28 22:18:24 -07:00
|
|
|
// NetNewsWire
|
2017-11-19 15:40:02 -08:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 11/19/17.
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2019-09-17 20:26:49 -05:00
|
|
|
import RSCore
|
2018-07-23 18:29:08 -07:00
|
|
|
import Articles
|
2019-12-16 22:45:59 -08:00
|
|
|
import ArticlesDatabase
|
2017-11-19 15:40:02 -08:00
|
|
|
import Account
|
|
|
|
|
|
|
|
struct TodayFeedDelegate: SmartFeedDelegate {
|
|
|
|
|
2019-11-15 06:19:14 -06:00
|
|
|
var feedID: FeedIdentifier? {
|
|
|
|
return FeedIdentifier.smartFeed(String(describing: TodayFeedDelegate.self))
|
2019-11-14 15:06:32 -06:00
|
|
|
}
|
|
|
|
|
2017-11-19 15:40:02 -08:00
|
|
|
let nameForDisplay = NSLocalizedString("Today", comment: "Today pseudo-feed title")
|
2021-03-24 05:43:07 -05:00
|
|
|
let fetchType = FetchType.today(nil)
|
2020-12-06 16:01:43 -06:00
|
|
|
var smallIcon: IconImage? {
|
|
|
|
return AppAssets.todayFeedImage
|
|
|
|
}
|
2019-09-17 20:26:49 -05:00
|
|
|
|
2019-12-16 22:45:59 -08:00
|
|
|
func fetchUnreadCount(for account: Account, completion: @escaping SingleUnreadCountCompletionBlock) {
|
2019-12-14 18:01:34 -07:00
|
|
|
account.fetchUnreadCountForToday(completion)
|
2017-11-19 15:40:02 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|