Recommended changes #7089
1 changed files with 6 additions and 5 deletions
|
@ -35,13 +35,14 @@ export const makeSelectIsPlaying = (uri: string) =>
|
||||||
|
|
||||||
export const makeSelectIsPlayerFloating = (location: UrlLocation) =>
|
export const makeSelectIsPlayerFloating = (location: UrlLocation) =>
|
||||||
createSelector(selectPrimaryUri, selectPlayingUri, (primaryUri, playingUri) => {
|
createSelector(selectPrimaryUri, selectPlayingUri, (primaryUri, playingUri) => {
|
||||||
|
const hasSecondarySource = playingUri && (playingUri.source === 'comment' || playingUri.source === 'markdown');
|
||||||
const isInlineSecondaryPlayer =
|
const isInlineSecondaryPlayer =
|
||||||
playingUri &&
|
playingUri && playingUri.uri !== primaryUri && location.pathname === playingUri.pathname && hasSecondarySource;
|
||||||
playingUri.uri !== primaryUri &&
|
|
||||||
location.pathname === playingUri.pathname &&
|
|
||||||
(playingUri.source === 'comment' || playingUri.source === 'markdown');
|
|
||||||
|
|
||||||
if ((playingUri && playingUri.primaryUri === primaryUri) || isInlineSecondaryPlayer) {
|
if (
|
||||||
|
(playingUri && (hasSecondarySource ? playingUri.primaryUri === primaryUri : playingUri.uri === primaryUri)) ||
|
||||||
|
isInlineSecondaryPlayer
|
||||||
|
) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue