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
|
|
|
|
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-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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|