From 670092f75980fb41754fe2403fa55115956a90ea Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Tue, 19 Dec 2023 15:57:00 -0800 Subject: [PATCH 1/4] [C-3527] Add native artist previews --- packages/mobile/src/app/App.tsx | 7 +- .../audio/{Audio.tsx => AudioPlayer.tsx} | 3 +- .../src/components/core/UserCoverPhoto.tsx | 2 +- .../Button/FollowButton/FollowButton.tsx | 12 +- .../components/Button/FollowButton/types.ts | 1 - packages/mobile/src/harmony-native/icons.ts | 3 + .../app-drawer-screen/AppDrawerScreen.tsx | 27 +++-- .../screens/sign-on-screen/SignOnStack.tsx | 5 +- .../sign-on-screen/components/ArtistTile.tsx | 42 ------- .../SelectArtistScreen/FollowArtistField.tsx | 75 ++++++++++-- .../SelectArtistsScreen.tsx | 55 ++++----- .../selectArtistPreviewContext.tsx | 109 ++++++++++++++++++ 12 files changed, 244 insertions(+), 97 deletions(-) rename packages/mobile/src/components/audio/{Audio.tsx => AudioPlayer.tsx} (99%) delete mode 100644 packages/mobile/src/screens/sign-on-screen/components/ArtistTile.tsx create mode 100644 packages/mobile/src/screens/sign-on-screen/screens/SelectArtistScreen/selectArtistPreviewContext.tsx diff --git a/packages/mobile/src/app/App.tsx b/packages/mobile/src/app/App.tsx index e4458e27ee7..cf34b850be0 100644 --- a/packages/mobile/src/app/App.tsx +++ b/packages/mobile/src/app/App.tsx @@ -8,12 +8,12 @@ import { SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context' +import TrackPlayer from 'react-native-track-player' import { Provider } from 'react-redux' import { useEffectOnce } from 'react-use' import { PersistGate } from 'redux-persist/integration/react' import FlipperAsyncStorage from 'rn-flipper-async-storage-advanced' -import { Audio } from 'app/components/audio/Audio' import HCaptcha from 'app/components/hcaptcha' import NavigationContainer from 'app/components/navigation-container' import { NotificationReminder } from 'app/components/notification-reminder/NotificationReminder' @@ -70,10 +70,8 @@ const App = () => { // Reset libs so that we get a clean app start useEffectOnce(() => { setLibs(null) - }) - - useEffectOnce(() => { subscribeToNetworkStatusUpdates() + TrackPlayer.setupPlayer() }) useEnterForeground(() => { @@ -110,7 +108,6 @@ const App = () => { -