Add recent searches to recent searches (IOS-141)

This commit is contained in:
Nathan Mattes 2023-09-17 13:52:35 +02:00
parent 558f88e77a
commit c0f2dc5649
2 changed files with 8 additions and 1 deletions

View File

@ -8,11 +8,12 @@
import Foundation
import CoreDataStack
import MastodonCore
import UIKit
extension DataSourceFacade {
static func responseToCreateSearchHistory(
provider: DataSourceProvider & AuthContextProvider,
provider: NeedsDependency & UIViewController & AuthContextProvider,
item: DataSourceItem
) async {
switch item {

View File

@ -193,6 +193,9 @@ class SearchResultsOverviewTableViewController: UIViewController, NeedsDependenc
provider: self,
tag: tag
)
await DataSourceFacade.responseToCreateSearchHistory(provider: self,
item: .hashtag(tag: .entity(tag)))
}
}
@ -214,6 +217,9 @@ class SearchResultsOverviewTableViewController: UIViewController, NeedsDependenc
if let user {
await DataSourceFacade.coordinateToProfileScene(provider:self,
user: user.asRecord)
await DataSourceFacade.responseToCreateSearchHistory(provider: self,
item: .user(record: user.asRecord))
}
}
}