mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-26 21:18:45 -06:00
Merge pull request #110 from anultravioletaurora/9-again-implement-playlist-crud
Fix CarPlay Runtime Errors
This commit is contained in:
@@ -10,7 +10,7 @@ const CarPlayHome : ListTemplate = new ListTemplate({
|
||||
tabTitle: "Home",
|
||||
sections: [
|
||||
{
|
||||
header: Client.user!.name,
|
||||
header: `Hi ${Client.user?.name ?? "there"}`,
|
||||
items: [
|
||||
{ id: QueryKeys.RecentlyPlayedArtists, text: 'Recent Artists' },
|
||||
{ id: QueryKeys.RecentlyPlayed, text: 'Recently Played'},
|
||||
|
||||
@@ -12,7 +12,7 @@ export const CarPlayRecentlyPlayed = (recentTracks : BaseItemDto[]) => new GridT
|
||||
track.Name ? track.Name : "Untitled Track"
|
||||
],
|
||||
image: {
|
||||
uri: getImageApi(Client.api!).getItemImageUrlById(track.Id!)
|
||||
uri: Client.api ? getImageApi(Client.api).getItemImageUrlById(track.Id!) : ""
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -27,8 +27,11 @@ const JellifyContextInitializer = () => {
|
||||
|
||||
function onConnect() {
|
||||
setCarPlayConnected(true);
|
||||
CarPlay.setRootTemplate(CarPlayNavigation, true);
|
||||
// CarPlay.enableNowPlaying(true); // https://github.com/birkir/react-native-carplay/issues/185
|
||||
|
||||
if (loggedIn) {
|
||||
CarPlay.setRootTemplate(CarPlayNavigation, true);
|
||||
// CarPlay.enableNowPlaying(true); // https://github.com/birkir/react-native-carplay/issues/185
|
||||
}
|
||||
}
|
||||
|
||||
function onDisconnect() {
|
||||
|
||||
Reference in New Issue
Block a user