chore: use fixed height searchBar

This commit is contained in:
CMK 2022-04-18 10:39:28 +08:00
parent b5e8e183f7
commit 8a95563976
1 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ import MastodonLocalization
final class HeightFixedSearchBar: UISearchBar { final class HeightFixedSearchBar: UISearchBar {
override var intrinsicContentSize: CGSize { override var intrinsicContentSize: CGSize {
return CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude) return CGSize(width: CGFloat.greatestFiniteMagnitude, height: 36)
} }
} }
@ -179,14 +179,14 @@ extension SearchViewController: UISearchControllerDelegate {
//extension SearchViewController: UICollectionViewDelegate { //extension SearchViewController: UICollectionViewDelegate {
// func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { // func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
// logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): select item at: \(indexPath.debugDescription)") // logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): select item at: \(indexPath.debugDescription)")
// //
// defer { // defer {
// collectionView.deselectItem(at: indexPath, animated: true) // collectionView.deselectItem(at: indexPath, animated: true)
// } // }
// //
// guard let diffableDataSource = viewModel.diffableDataSource else { return } // guard let diffableDataSource = viewModel.diffableDataSource else { return }
// guard let item = diffableDataSource.itemIdentifier(for: indexPath) else { return } // guard let item = diffableDataSource.itemIdentifier(for: indexPath) else { return }
// //
// switch item { // switch item {
// case .trend(let hashtag): // case .trend(let hashtag):
// let viewModel = HashtagTimelineViewModel(context: context, hashtag: hashtag.name) // let viewModel = HashtagTimelineViewModel(context: context, hashtag: hashtag.name)