Skip to content

Commit

Permalink
[PAY-2975] Fix mobile-web premium album overflow options (#8441)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored May 10, 2024
1 parent ebb531b commit 64fc7fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 3 additions & 1 deletion packages/web/src/components/link/UserLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export const UserLink = (props: UserLinkProps) => {
ellipses={popover}
{...other}
>
<Text ellipses>{userName}</Text>
<Text ellipses variant='body'>
{userName}
</Text>
<UserBadges
badgeSize={iconSizes[badgeSize]}
userId={userId}
Expand Down
17 changes: 11 additions & 6 deletions packages/web/src/components/track/mobile/ConnectedPlaylistTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ const ConnectedPlaylistTile = ({
const isActive = useMemo(() => {
return tracks.some((track) => track.uid === playingUid)
}, [tracks, playingUid])
const hasStreamAccess = !!collection.access?.stream

const { isEnabled: isEditAlbumsEnabled } = useFlag(FeatureFlags.EDIT_ALBUMS)

Expand Down Expand Up @@ -179,12 +180,16 @@ const ConnectedPlaylistTile = ({

const onClickOverflow = useCallback(() => {
const overflowActions = [
collection.has_current_user_reposted
? OverflowAction.UNREPOST
: OverflowAction.REPOST,
collection.has_current_user_saved
? OverflowAction.UNFAVORITE
: OverflowAction.FAVORITE,
hasStreamAccess
? collection.has_current_user_reposted
? OverflowAction.UNREPOST
: OverflowAction.REPOST
: null,
hasStreamAccess
? collection.has_current_user_saved && hasStreamAccess
? OverflowAction.UNFAVORITE
: OverflowAction.FAVORITE
: null,
collection.is_album
? OverflowAction.VIEW_ALBUM_PAGE
: OverflowAction.VIEW_PLAYLIST_PAGE,
Expand Down

0 comments on commit 64fc7fa

Please sign in to comment.