Skip to content

Commit

Permalink
fix search crash on tvOS
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Nov 18, 2024
1 parent cc39c52 commit 4ddf836
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import RxSwift
import PVRealm
import PVLogging

#if os(tvOS)
import PVUI_TV
#endif

public let PageIndicatorHeight: CGFloat = 2.5

protocol SubCellItem {
Expand Down Expand Up @@ -258,7 +262,7 @@ private extension PVGameLibraryCollectionViewCell {
#if os(iOS)
collectionView.register(UINib(nibName: "PVGameLibraryCollectionViewCell", bundle: BundleLoader.bundle), forCellWithReuseIdentifier: identifier)
#else
collectionView.register(UINib(nibName: "PVGameLibraryCollectionViewCell~tvOS", bundle: BundleLoader.bundle), forCellWithReuseIdentifier: identifier)
collectionView.register(UINib(nibName: "PVGameLibraryCollectionViewCell~tvOS", bundle: PVUI_TV.BundleLoader.bundle), forCellWithReuseIdentifier: identifier)
#endif
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ import PVSettings
import PVWebServer
#endif

#if os(tvOS)
import PVUI_TV
#endif

let PVGameLibraryHeaderViewIdentifier = "PVGameLibraryHeaderView"
let PVGameLibraryFooterViewIdentifier = "PVGameLibraryFooterView"

Expand Down Expand Up @@ -524,7 +528,7 @@ public final class PVGameLibraryViewController: GCEventViewController, UITextFie
#if os(iOS)
collectionView.register(UINib(nibName: "PVGameLibraryCollectionViewCell", bundle: BundleLoader.module), forCellWithReuseIdentifier: PVGameLibraryCollectionViewCellIdentifier)
#else
collectionView.register(UINib(nibName: "PVGameLibraryCollectionViewCell~tvOS", bundle: BundleLoader.module), forCellWithReuseIdentifier: PVGameLibraryCollectionViewCellIdentifier)
collectionView.register(UINib(nibName: "PVGameLibraryCollectionViewCell~tvOS", bundle: PVUI_TV.BundleLoader.bundle), forCellWithReuseIdentifier: PVGameLibraryCollectionViewCellIdentifier)
#endif
// Adjust collection view layout for iPhone X Safe areas
// Can remove this when we go iOS 9+ and just use safe areas
Expand Down

0 comments on commit 4ddf836

Please sign in to comment.