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
|
2019-12-17 07:45:59 +01:00
|
|
|
import ArticlesDatabase
|
2024-04-16 07:21:17 +02:00
|
|
|
import Images
|
2019-02-25 04:22:16 +01:00
|
|
|
|
2024-04-03 07:26:16 +02:00
|
|
|
@MainActor struct SearchFeedDelegate: SmartFeedDelegate {
|
2019-02-25 04:22:16 +01:00
|
|
|
|
2024-02-26 06:34:22 +01:00
|
|
|
var sidebarItemID: SidebarItemIdentifier? {
|
2024-02-26 06:17:00 +01:00
|
|
|
return SidebarItemIdentifier.smartFeed(String(describing: SearchFeedDelegate.self))
|
2019-11-14 22:06:32 +01:00
|
|
|
}
|
|
|
|
|
2019-02-25 04:22:16 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2024-03-25 02:49:39 +01:00
|
|
|
func unreadCount(account: Account) async -> Int {
|
|
|
|
|
|
|
|
return 0
|
2019-02-25 04:22:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|