fix(mobile): build the iPad sidebar below iOS 18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
joshuafhigginsandClaude Opus 5.5 committed 2026-11-19 19:02:28 -05:00 Verified
1 parent d13b0b3daf
commit a006518b3e
1 file changed
+5 -3
+5 -3
View File
@@ -44,7 +44,9 @@ final class TabletSidebarView: ExpoView {
let onPlaylistPress = EventDispatcher()
var playlists: [SidebarPlaylist] = []
private let selectionProxy = SidebarSelectionProxy()
private var playlistTabs: [String: UITab] = [:]
/// Playlist rows by identifier. Typed loosely because stored properties
/// can't be gated to iOS 18, where `UITab` arrives; values are always `UITab`.
private var playlistTabs: [String: NSObject] = [:]
private var coverImages: [String: UIImage] = [:]
private var coverTasks: [String: URLSessionDataTask] = [:]
var accountName = ""
@@ -201,7 +203,7 @@ extension TabletSidebarView {
var rows: [UITab] = []
for playlist in playlists {
let identifier = playlistTabPrefix + playlist.id
let tab = playlistTabs[identifier] ?? UITab(
let tab = playlistTabs[identifier] as? UITab ?? UITab(
title: playlist.title, image: nil, identifier: identifier,
viewControllerProvider: { _ in UIViewController() })
playlistTabs[identifier] = tab
@@ -233,7 +235,7 @@ extension TabletSidebarView {
guard let self else { return }
self.coverTasks[url] = nil
self.coverImages[url] = roundedIcon(image)
if let tab = self.playlistTabs[identifier] { tab.image = self.coverImages[url] }
if let tab = self.playlistTabs[identifier] as? UITab { tab.image = self.coverImages[url] }
}
}
coverTasks[url] = task