2017-11-19 15:40:02 -08:00
|
|
|
//
|
|
|
|
// StarredFeedDelegate.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
|
2017-11-19 15:40:02 -08:00
|
|
|
import Account
|
|
|
|
|
2019-07-05 20:06:31 -07:00
|
|
|
// Main thread only.
|
2017-11-19 15:40:02 -08:00
|
|
|
|
|
|
|
struct StarredFeedDelegate: SmartFeedDelegate {
|
|
|
|
|
|
|
|
let nameForDisplay = NSLocalizedString("Starred", comment: "Starred pseudo-feed title")
|
2019-07-05 20:06:31 -07:00
|
|
|
let fetchType: FetchType = .starred
|
2019-09-17 20:26:49 -05:00
|
|
|
var smallIcon: RSImage? = AppAssets.starredFeedImage
|
2017-11-19 15:40:02 -08:00
|
|
|
|
|
|
|
func fetchUnreadCount(for account: Account, callback: @escaping (Int) -> Void) {
|
|
|
|
account.fetchUnreadCountForStarredArticles(callback)
|
|
|
|
}
|
|
|
|
}
|