mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2026-01-05 21:30:53 -06:00
omfg plz
This commit is contained in:
@@ -6,8 +6,8 @@ import { CarPlayInterface, NowPlayingTemplate, TabBarTemplate } from "react-nati
|
||||
|
||||
// 'react-native-carplay' has also been disabled for android builds in react-native.config.js
|
||||
const CarPlay = Platform.OS === 'ios' ? require('react-native-carplay').CarPlay as CarPlayInterface : null;
|
||||
const CarPlayNavigation : TabBarTemplate = CarPlay ? require('./CarPlay/Navigation').CarPlayNavigation : null;
|
||||
const CarPlayNowPlaying : NowPlayingTemplate = CarPlay ? require('./CarPlay/NowPlaying') : null;
|
||||
const CarPlayNavigation = !!CarPlay ? require('./CarPlay/Navigation').CarPlayNavigation : null;
|
||||
const CarPlayNowPlaying = !!CarPlay ? require('./CarPlay/NowPlaying').CarPlayNowPlaying : null
|
||||
|
||||
interface JellifyContext {
|
||||
loggedIn: boolean;
|
||||
@@ -34,6 +34,10 @@ const JellifyContextInitializer = () => {
|
||||
setCarPlayConnected(true);
|
||||
|
||||
if (loggedIn && CarPlay) {
|
||||
|
||||
console.debug(CarPlayNavigation);
|
||||
console.debug(CarPlayNowPlaying);
|
||||
|
||||
CarPlay.setRootTemplate(CarPlayNavigation, true);
|
||||
CarPlay.pushTemplate(CarPlayNowPlaying, true);
|
||||
CarPlay.enableNowPlaying(true); // https://github.com/birkir/react-native-carplay/issues/185
|
||||
|
||||
Reference in New Issue
Block a user