Hide playing icon if player is paused
This commit is contained in:
parent
b28fe4cbc9
commit
818f155993
1 changed files with 10 additions and 4 deletions
|
@ -133,14 +133,20 @@ const StaticSvg = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const RowIndexCell = ({ value, eGridCell }: ICellRendererParams) => {
|
export const RowIndexCell = ({ value, eGridCell }: ICellRendererParams) => {
|
||||||
const isFocused = eGridCell.classList.contains('focused');
|
const classList = eGridCell.classList;
|
||||||
|
const isFocused = classList.contains('focused');
|
||||||
|
const isPlaying = classList.contains('playing');
|
||||||
const isCurrentSong =
|
const isCurrentSong =
|
||||||
eGridCell.classList.contains('current-song') ||
|
classList.contains('current-song') || classList.contains('current-playlist-song');
|
||||||
eGridCell.classList.contains('current-playlist-song');
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CellContainer $position="right">
|
<CellContainer $position="right">
|
||||||
{isFocused && isCurrentSong ? <AnimatedSvg /> : isCurrentSong ? <StaticSvg /> : null}
|
{isPlaying &&
|
||||||
|
(isFocused && isCurrentSong ? (
|
||||||
|
<AnimatedSvg />
|
||||||
|
) : isCurrentSong ? (
|
||||||
|
<StaticSvg />
|
||||||
|
) : null)}
|
||||||
<Text
|
<Text
|
||||||
$secondary
|
$secondary
|
||||||
align="right"
|
align="right"
|
||||||
|
|
Reference in a new issue