Skip to content

Commit

Permalink
fix: livestatus display
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Feb 28, 2024
1 parent d4f1d56 commit 0936565
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/playlist/SongList/SongInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ const SongInfo = ({
};
const checked = selected[getSongIndex()];

const isItemSolid = () => {
if (item.liveStatus === true || !networkCellular) return true;
if (playerSetting.dataSaver && !NoxCache.noxMediaCache?.peekCache(item)) {
return false;
}
return true;
};

return (
<View
style={[
Expand All @@ -81,12 +89,7 @@ const SongInfo = ({
backgroundColor: currentPlaying
? playerStyle.customColors.playlistDrawerBackgroundColorTransparent
: 'transparent',
opacity:
item.liveStatus === true ||
(!playerSetting.dataSaver &&
(NoxCache.noxMediaCache?.peekCache(item) || !networkCellular))
? undefined
: 0.5,
opacity: isItemSolid() ? undefined : 0.5,
},
]}
>
Expand Down

0 comments on commit 0936565

Please sign in to comment.