@@ -104,7 +104,7 @@ class VLCFavoriteListViewController: UIViewController {
104104 searchBarConstraint = searchBar. topAnchor. constraint ( equalTo: view. topAnchor, constant: - searchBarSize)
105105 view. addSubview ( searchBar)
106106 NSLayoutConstraint . activate ( [
107- searchBar . topAnchor . constraint ( equalTo : view . topAnchor , constant : 5 ) ,
107+ searchBarConstraint! ,
108108 searchBar. leadingAnchor. constraint ( equalTo: view. leadingAnchor, constant: 10 ) ,
109109 searchBar. trailingAnchor. constraint ( equalTo: view. trailingAnchor, constant: - 10 ) ,
110110 searchBar. heightAnchor. constraint ( equalToConstant: searchBarSize)
@@ -210,10 +210,10 @@ extension VLCFavoriteListViewController: UITableViewDelegate, UITableViewDataSou
210210 func tableView( _ tableView: UITableView , cellForRowAt indexPath: IndexPath ) -> UITableViewCell {
211211 let cell = tableView. dequeueReusableCell ( withIdentifier: " LocalNetworkCell " , for: indexPath) as! VLCNetworkListCell
212212 if let favorite = isSearching ? searchResults [ indexPath. row] : favoriteService. favoriteOfServer ( with: indexPath. section, at: indexPath. row) {
213- cell. title = favorite. userVisibleName
214- cell. isDirectory = true
215- cell. thumbnailImage = UIImage ( named: " folder " )
216- cell. folderTitleLabel. textColor = PresentationTheme . current. colors. cellTextColor
213+ cell. title = favorite. userVisibleName
214+ cell. isDirectory = true
215+ cell. thumbnailImage = UIImage ( named: " folder " )
216+ cell. folderTitleLabel. textColor = PresentationTheme . current. colors. cellTextColor
217217 }
218218 return cell
219219 }
@@ -280,7 +280,6 @@ extension VLCFavoriteListViewController: UISearchBarDelegate {
280280 searchResults = searchDataSource
281281 } else {
282282 searchResults = searchDataSource. filter { favorite in
283- print ( favorite. userVisibleName)
284283 return favorite. userVisibleName. range ( of: searchText, options: . caseInsensitive) != nil
285284 }
286285 }
@@ -301,6 +300,7 @@ extension VLCFavoriteListViewController: UISearchBarDelegate {
301300extension VLCFavoriteListViewController : UIScrollViewDelegate {
302301 func scrollViewDidScroll( _ scrollView: UIScrollView ) {
303302 searchBarConstraint? . constant = - min( scrollView. contentOffset. y, searchBarSize) - searchBarSize
303+ view. layoutIfNeeded ( )
304304 if scrollView. contentOffset. y < - searchBarSize && scrollView. contentInset. top != searchBarSize {
305305 tableView. contentInset. top = searchBarSize
306306 }
0 commit comments