2019-02-25 04:22:16 +01:00
|
|
|
//
|
|
|
|
// SearchFeedDelegate.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 2/24/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2019-09-18 03:26:49 +02:00
|
|
|
import RSCore
|
2019-02-25 04:22:16 +01:00
|
|
|
import Account
|
|
|
|
import Articles
|
|
|
|
|
|
|
|
struct SearchFeedDelegate: SmartFeedDelegate {
|
|
|
|
|
|
|
|
var nameForDisplay: String {
|
|
|
|
return nameForDisplayPrefix + searchString
|
|
|
|
}
|
|
|
|
|
|
|
|
let nameForDisplayPrefix = NSLocalizedString("Search: ", comment: "Search smart feed title prefix")
|
|
|
|
let searchString: String
|
2019-07-06 05:06:31 +02:00
|
|
|
let fetchType: FetchType
|
2019-11-06 01:05:57 +01:00
|
|
|
var smallIcon: IconImage? = AppAssets.searchFeedImage
|
2019-02-25 04:22:16 +01:00
|
|
|
|
|
|
|
init(searchString: String) {
|
|
|
|
self.searchString = searchString
|
2019-07-06 05:06:31 +02:00
|
|
|
self.fetchType = .search(searchString)
|
2019-02-25 04:22:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func fetchUnreadCount(for: Account, callback: @escaping (Int) -> Void) {
|
|
|
|
// TODO: after 5.0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|