Skip to content

Commit

Permalink
[PAY-3236][PAY-3242][PAY-3259] Fix play button in tracks table (#9288)
Browse files Browse the repository at this point in the history
Co-authored-by: Saliou Diallo <saliou@audius.co>
  • Loading branch information
sddioulde and Saliou Diallo authored Jul 30, 2024
1 parent d87357e commit f713455
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/discovery-provider/src/api/v1/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ def get(self, id: str, authed_user_id: int):
filter_type = format_library_filter(args)

get_tracks_args = GetTrackLibraryArgs(
filter_deleted=False,
filter_deleted=True,
user_id=decoded_id,
current_user_id=decoded_id,
limit=limit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const Radio = (props: RadioProps) => {
onPress={onValueChange}
style={[style, disabled && { opacity: 0.5 }]}
disabled={disabled}
activeOpacity={Number(checked)}
>
<Flex gap='l' {...flexProps}>
<Flex direction='row' gap='m'>
Expand Down
7 changes: 2 additions & 5 deletions packages/web/src/components/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,8 @@ export const Table = ({
)}
{...props}
key={key}
onClick={
isLocked
? undefined
: (e: MouseEvent<HTMLTableRowElement>) =>
onClickRow?.(e, row, row.index)
onClick={(e: MouseEvent<HTMLTableRowElement>) =>
onClickRow?.(e, row, row.index)
}
>
{cells.map((cell) => renderCell(cell))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const TablePlayButton = ({
className={cn(styles.icon, {
[styles.hideDefault]: hideDefault && !playing
})}
fill={isLocked ? n150 : shouldShowPremiumColor ? lightGreen : p300}
fill={shouldShowPremiumColor ? lightGreen : isLocked ? n150 : p300}
/>
)}
</div>
Expand Down
12 changes: 7 additions & 5 deletions packages/web/src/pages/saved-page/SavedPageProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ class SavedPage extends PureComponent<SavedPageProps, SavedPageState> {
const playingIndex = tracks.entries.findIndex(
({ uid }: any) => uid === playingUid
)
const filteredMetadata = this.formatMetadata(trackMetadatas).filter(
(item) =>
item.title?.toLowerCase().indexOf(filterText.toLowerCase()) > -1 ||
item.user?.name.toLowerCase().indexOf(filterText.toLowerCase()) > -1
)
const filteredMetadata = this.formatMetadata(trackMetadatas)
.filter((item) => !item._marked_deleted && !item.is_delete)
.filter(
(item) =>
item.title?.toLowerCase().indexOf(filterText.toLowerCase()) > -1 ||
item.user?.name.toLowerCase().indexOf(filterText.toLowerCase()) > -1
)
const filteredIndex =
playingIndex > -1
? filteredMetadata.findIndex((metadata) => metadata.uid === playingUid)
Expand Down

0 comments on commit f713455

Please sign in to comment.