Skip to content

Commit

Permalink
Enable playlist updates on prod (#3668)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjeffers committed Jun 28, 2023
1 parent 2d79098 commit 2b3fccd
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const AddToPlaylistDrawer = () => {
const isTrackUnlisted = useSelector(getTrackIsUnlisted)
const user = useSelector(getAccountWithOwnPlaylists)
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const renderImage = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const FormImageInput = ({
const [isLoading, setIsLoading] = useState(false)
const [{ value }, , { setValue }] = useField(name)
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const { url } = value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const DetailsTileActionButtons = ({
const styles = useStyles()
const { neutralLight4 } = useThemeColors()
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)
const isCollectionEmpty = useSelector((state: CommonState) =>
getIsCollectionEmpty(state, { id: collectionId })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type Props = {
const CollectionOverflowMenuDrawer = ({ render }: Props) => {
const dispatch = useDispatch()
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)
const { navigation: contextNavigation } = useContext(AppTabNavigationContext)
const navigation = useNavigation({ customNavigation: contextNavigation })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const modalScreenOptions = { presentation: 'fullScreenModal' as const }

export const AppScreen = () => {
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)
return (
<Stack.Navigator screenOptions={{ headerShown: false }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const AppTabScreen = ({ baseScreen, Stack }: AppTabScreenProps) => {
const { drawerNavigation } = useContext(AppDrawerContext)
const { isOpen: isNowPlayingDrawerOpen } = useDrawer('NowPlaying')
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const handleChangeState = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type CollectionHeaderProps = {
export const CollectionHeader = (props: CollectionHeaderProps) => {
const { collectionId } = props
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)
const collection = useSelector((state) =>
getCollection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const PlaylistsTab = () => {
navigation.push('CreatePlaylist')
}, [navigation])
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const [filterValue, setFilterValue] = useState('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const PlaylistsTab = () => {
const isFocused = useIsFocused()
const dispatch = useDispatch()
const { isEnabled: isPlaylistUpdatesEnabled } = useFeatureFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function* addTrackToPlaylistAsync(action: AddTrackToPlaylistAction) {
const getFeatureEnabled = yield* getContext('getFeatureEnabled')
const isPlaylistImprovementsEnabled = yield* call(
getFeatureEnabled,
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)
const audiusBackendInstance = yield* getContext('audiusBackendInstance')
const web3 = yield* call(audiusBackendInstance.getWeb3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function* editPlaylistAsync(action) {
yield call(confirmEditPlaylist, action.playlistId, userId, playlist)

playlist.playlist_id = action.playlistId
if (playlist.artwork?.url) {
if (playlist.artwork?.file) {
playlist.cover_art_sizes = playlist.artwork.url
playlist._cover_art_sizes = {
[DefaultSizes.OVERRIDE]: playlist.artwork.url
Expand All @@ -117,9 +117,7 @@ function* confirmEditPlaylist(playlistId, userId, formFields) {
function* (confirmedPlaylistId) {
const { blockHash, blockNumber, error } = yield call(
audiusBackendInstance.updatePlaylist,
{
...formFields
}
formFields
)

if (error) throw error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const AddToPlaylistModal = () => {
)
const [searchValue, setSearchValue] = useState('')
const { isEnabled: isPlaylistUpdatesEnabled } = useFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const filteredPlaylists = useMemo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const CreatePlaylistLibraryItemButton = (props: Props) => {
const library = useSelector(getPlaylistLibrary)
const hideFolderTab = useSelector(getHideFolderTab)
const { isEnabled: isPlaylistUpdatesEnabled } = useFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const getTooltipPopupContainer = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const NavItemKebabButton = (props: EditNavItemButtonProps) => {
const { className, visible, items, ...other } = props

const { isEnabled: isPlaylistUpdatesEnabled } = useFlag(
FeatureFlags.PLAYLIST_UPDATES_PRE_QA
FeatureFlags.PLAYLIST_UPDATES_POST_QA
)

const renderKebabButton = (buttonProps?: Partial<IconButtonButtonProps>) => {
Expand Down

0 comments on commit 2b3fccd

Please sign in to comment.