Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Fix android double play (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptype authored Nov 27, 2022
1 parent 309e691 commit 0e35f7c
Showing 1 changed file with 46 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,55 +294,53 @@ export const NowPlayingDrawer = memo(function NowPlayingDrawer(
// Disable safe area view edges because they are handled manually
disableSafeAreaView
>
{track ? (
<View
style={[
styles.container,
{ paddingTop: staticTopInset.current, paddingBottom: insets.bottom }
]}
>
<View style={styles.playBarContainer}>
<PlayBar
track={track}
user={user}
onPress={onDrawerOpen}
translationAnim={translationAnim}
/>
</View>
<Logo translationAnim={translationAnim} />
<View style={styles.titleBarContainer}>
<TitleBar onClose={handleDrawerCloseFromSwipe} />
</View>
<Pressable onPress={handlePressTitle} style={styles.artworkContainer}>
<Artwork track={track} />
</Pressable>
<View style={styles.trackInfoContainer}>
<TrackInfo
onPressArtist={handlePressArtist}
onPressTitle={handlePressTitle}
track={track}
user={user}
/>
</View>
<View style={styles.scrubberContainer}>
<Scrubber
mediaKey={`${mediaKey}`}
isPlaying={isPlaying}
onPressIn={onPressScrubberIn}
onPressOut={onPressScrubberOut}
duration={track?.duration ?? 0}
/>
</View>
<View style={styles.controlsContainer}>
<AudioControls
onNext={onNext}
onPrevious={onPrevious}
isPodcast={track?.genre === Genre.PODCASTS}
/>
<ActionsBar track={track} />
</View>
<View
style={[
styles.container,
{ paddingTop: staticTopInset.current, paddingBottom: insets.bottom }
]}
>
<View style={styles.playBarContainer}>
<PlayBar
track={track}
user={user}
onPress={onDrawerOpen}
translationAnim={translationAnim}
/>
</View>
) : null}
<Logo translationAnim={translationAnim} />
<View style={styles.titleBarContainer}>
<TitleBar onClose={handleDrawerCloseFromSwipe} />
</View>
<Pressable onPress={handlePressTitle} style={styles.artworkContainer}>
<Artwork track={track} />
</Pressable>
<View style={styles.trackInfoContainer}>
<TrackInfo
onPressArtist={handlePressArtist}
onPressTitle={handlePressTitle}
track={track}
user={user}
/>
</View>
<View style={styles.scrubberContainer}>
<Scrubber
mediaKey={`${mediaKey}`}
isPlaying={isPlaying}
onPressIn={onPressScrubberIn}
onPressOut={onPressScrubberOut}
duration={track?.duration ?? 0}
/>
</View>
<View style={styles.controlsContainer}>
<AudioControls
onNext={onNext}
onPrevious={onPrevious}
isPodcast={track?.genre === Genre.PODCASTS}
/>
<ActionsBar track={track} />
</View>
</View>
</Drawer>
)
})

0 comments on commit 0e35f7c

Please sign in to comment.