NetNewsWire/Shared/SmartFeeds/SearchTimelineFeedDelegate.swift

40 lines
982 B
Swift
Raw Normal View History

2019-08-31 22:53:47 +02:00
//
// SearchTimelineFeedDelegate.swift
// NetNewsWire
//
// Created by Maurice Parker on 8/31/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import Foundation
import Account
import Articles
import ArticlesDatabase
import Images
2019-08-31 22:53:47 +02:00
@MainActor struct SearchTimelineFeedDelegate: SmartFeedDelegate {
2019-08-31 22:53:47 +02:00
2024-02-26 06:34:22 +01:00
var sidebarItemID: SidebarItemIdentifier? {
return SidebarItemIdentifier.smartFeed(String(describing: SearchTimelineFeedDelegate.self))
}
2019-08-31 22:53:47 +02:00
var nameForDisplay: String {
return nameForDisplayPrefix + searchString
}
let nameForDisplayPrefix = NSLocalizedString("Search: ", comment: "Search smart feed title prefix")
let searchString: String
let fetchType: FetchType
var smallIcon: IconImage? = AppAssets.searchFeedImage
2019-08-31 22:53:47 +02:00
init(searchString: String, articleIDs: Set<String>) {
self.searchString = searchString
self.fetchType = .searchWithArticleIDs(searchString, articleIDs)
}
2024-03-25 02:49:39 +01:00
func unreadCount(account: Account) async -> Int {
return 0
2019-08-31 22:53:47 +02:00
}
}