From 47c67be4c58ab70225dee9d787142cfa6ab15a57 Mon Sep 17 00:00:00 2001 From: fdelu Date: Thu, 7 Jul 2022 16:08:14 -0300 Subject: [PATCH 01/11] Fix scores of 0 inside AlbumReviews --- src/components/albums/Reviews/AlbumReviews.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/albums/Reviews/AlbumReviews.js b/src/components/albums/Reviews/AlbumReviews.js index 7b5e8e2..b0f92e8 100644 --- a/src/components/albums/Reviews/AlbumReviews.js +++ b/src/components/albums/Reviews/AlbumReviews.js @@ -63,7 +63,9 @@ const AlbumReviews = ({ albumId }) => { {comment.reviewer.name} - {comment.score ? Score: {comment.score} : null} + {comment.score || comment.score === 0 ? ( + Score: {comment.score} + ) : null} {comment.text ? Review: {comment.text} : null} )) From 7e29c41abcaa5d7fb359fb9b837a5c484d551a2e Mon Sep 17 00:00:00 2001 From: fdelu Date: Thu, 7 Jul 2022 17:55:29 -0300 Subject: [PATCH 02/11] Bump version and add microphone warning to live streams --- app.json | 2 +- package-lock.json | 6 +- package.json | 4 +- .../streamings/HostingLiveScreen.js | 71 +++++++++++++++++-- src/components/streamings/permission.js | 1 + src/components/streamings/useStreamings.js | 5 -- src/components/styles.js | 10 +++ 7 files changed, 84 insertions(+), 15 deletions(-) diff --git a/app.json b/app.json index ae464e1..ade397e 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Spotifiuby", "slug": "Spotifiuby", - "version": "1.0.0", + "version": "1.0.1", "icon": "src/img/icon.png", "userInterfaceStyle": "automatic", "android": { diff --git a/package-lock.json b/package-lock.json index e6f4daa..5102755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "spotifiuby", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "spotifiuby", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "@react-native-async-storage/async-storage": "~1.17.3", "async-mutex": "^0.3.2", @@ -52532,4 +52532,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index dd5ad00..8f4cf9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spotifiuby", - "version": "1.0.0", + "version": "1.0.1", "main": "index.js", "scripts": { "start": "expo start --dev-client", @@ -91,4 +91,4 @@ "__DEV__": true } } -} +} \ No newline at end of file diff --git a/src/components/streamings/HostingLiveScreen.js b/src/components/streamings/HostingLiveScreen.js index fe39d0c..0e74d00 100644 --- a/src/components/streamings/HostingLiveScreen.js +++ b/src/components/streamings/HostingLiveScreen.js @@ -1,6 +1,12 @@ import React, { useEffect, useState, useRef } from "react"; import { View } from "react-native"; -import { ActivityIndicator, Button, Chip, Title } from "react-native-paper"; +import { + ActivityIndicator, + Button, + Chip, + Title, + Text, +} from "react-native-paper"; import styles from "../styles"; import PropTypes from "prop-types"; import { STREAMINGS_URL, fetch } from "../../util/services"; @@ -10,6 +16,7 @@ import { StorageAccessFramework, EncodingType } from "expo-file-system"; import { toLocalDate } from "../../util/general"; import { ShapedImage } from "../general/ShapedImage"; import useStreamings from "./useStreamings"; +import Icon from "react-native-vector-icons/MaterialCommunityIcons"; function Loading() { return ( @@ -112,17 +119,43 @@ export default function HostingLiveScreen({ navigation, route }) { function Hosting({ uid, name, img, token, navigation, onError }) { const { engine, joined } = useStreamings(uid, token, true); + const [color, setColor] = useState("red"); + const [alert, setAlert] = useState(null); + + useEffect(() => { + const interval = global.setInterval(() => { + setColor((color) => (color === "red" ? "gray" : "red")); + }, 1000); + return () => global.clearInterval(interval); + }, []); useEffect(() => { if (!engine) return; - let subscription = engine.addListener("Error", () => { + const timeout = { t: null }; + let subscription_err = engine.addListener("Error", () => { onError(); toast.show("Live stream error"); navigation.goBack(); }); + let subscription_warn = engine.addListener("Warning", (warn) => { + if (warn == 1019) { + if (timeout.t) global.clearTimeout(timeout.t); + const now = new Date().getTime(); + setAlert(now); + timeout.t = global.setTimeout(() => { + setAlert((prev) => { + if (prev == now) return null; + return prev; + }); + }, 15000); + } + }); + return () => { - subscription?.remove(); + subscription_err?.remove(); + subscription_warn?.remove(); + if (timeout.t) global.clearTimeout(timeout.t); }; }, [engine]); @@ -141,7 +174,11 @@ function Hosting({ uid, name, img, token, navigation, onError }) { justifyContent: "flex-start", }} > - + } + style={{ marginVertical: "5%" }} + textStyle={{ fontWeight: "bold" }} + > Broadcasting @@ -159,6 +196,32 @@ function Hosting({ uid, name, img, token, navigation, onError }) { > stop + {alert ? ( + + + + {"Can't"} detect your microphone. + + + Please check that no other application is using it. + + + ) : null} ); } diff --git a/src/components/streamings/permission.js b/src/components/streamings/permission.js index 9e2a257..815d945 100644 --- a/src/components/streamings/permission.js +++ b/src/components/streamings/permission.js @@ -14,6 +14,7 @@ export default async function requestRecordPermission() { ) return true; } catch (err) { + console.error(err); toast.show("Internal error"); } diff --git a/src/components/streamings/useStreamings.js b/src/components/streamings/useStreamings.js index bca732d..841a4f2 100644 --- a/src/components/streamings/useStreamings.js +++ b/src/components/streamings/useStreamings.js @@ -42,10 +42,6 @@ function useStreamings(channelName, token, host) { await eng.setChannelProfile(ChannelProfile.LiveBroadcasting); - const sub_warn = eng.addListener("Warning", (warn) => { - console.warn("Warning: ", warn); - }); - const sub_err = eng.addListener("Error", (err) => { console.warn("Error: ", err); }); @@ -61,7 +57,6 @@ function useStreamings(channelName, token, host) { return () => { eng.leaveChannel(); - sub_warn.remove(); sub_err.remove(); sub_list.remove(); eng.destroy(); diff --git a/src/components/styles.js b/src/components/styles.js index 5a66e09..e5e576f 100644 --- a/src/components/styles.js +++ b/src/components/styles.js @@ -165,6 +165,16 @@ const styles = StyleSheet.create({ fontWeight: "600", fontSize: 20, }, + warnBackground: { + width: "80%", + backgroundColor: "#FFF4E9", + borderRadius: 5, + margin: "5%", + padding: "5%", + }, + warn: { + color: "#6f3200", + }, }); export default styles; From 5a55f1d044aa6874e3dcbb9e8bba169a65d8cd4d Mon Sep 17 00:00:00 2001 From: Tomas Civini Date: Thu, 7 Jul 2022 19:28:49 -0300 Subject: [PATCH 03/11] star ratings --- package-lock.json | 83 +++++++++++++++++++++++++++++- package.json | 4 +- src/components/albums/AlbumInfo.js | 18 +++++-- 3 files changed, 99 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6f4daa..79c7307 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,9 @@ "jest": "^26.6.3", "react-native-paper-dropdown": "^1.0.7", "react-native-safe-area-context": "4.2.4", - "react-native-screens": "~3.11.1" + "react-native-screens": "~3.11.1", + "react-native-star-rating-widget": "^1.2.0", + "react-native-svg": "^12.3.0" } }, "node_modules/@ampproject/remapping": { @@ -23291,6 +23293,50 @@ "react-native": "*" } }, + "node_modules/react-native-star-rating-widget": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/react-native-star-rating-widget/-/react-native-star-rating-widget-1.2.0.tgz", + "integrity": "sha512-SfaUFaElJtTmNMn/kqYl2h/QTiDGikvE0K4XzrfNjndTMUdM/30+jt+HpaZpUufAKsCGRo9rP/Q+x1m6guYIBg==", + "dev": true, + "peerDependencies": { + "react": "*", + "react-native": "*", + "react-native-svg": "*" + } + }, + "node_modules/react-native-svg": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.3.0.tgz", + "integrity": "sha512-ESG1g1j7/WLD7X3XRFTQHVv0r6DpbHNNcdusngAODIxG88wpTWUZkhcM3A2HJTb+BbXTFDamHv7FwtRKWQ/ALg==", + "dev": true, + "dependencies": { + "css-select": "^4.2.1", + "css-tree": "^1.0.0-alpha.39" + }, + "peerDependencies": { + "react": "*", + "react-native": ">=0.50.0" + } + }, + "node_modules/react-native-svg/node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/react-native-svg/node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, "node_modules/react-native-toast-notifications": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/react-native-toast-notifications/-/react-native-toast-notifications-3.3.0.tgz", @@ -47670,6 +47716,41 @@ "warn-once": "^0.1.0" } }, + "react-native-star-rating-widget": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/react-native-star-rating-widget/-/react-native-star-rating-widget-1.2.0.tgz", + "integrity": "sha512-SfaUFaElJtTmNMn/kqYl2h/QTiDGikvE0K4XzrfNjndTMUdM/30+jt+HpaZpUufAKsCGRo9rP/Q+x1m6guYIBg==", + "dev": true, + "requires": {} + }, + "react-native-svg": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.3.0.tgz", + "integrity": "sha512-ESG1g1j7/WLD7X3XRFTQHVv0r6DpbHNNcdusngAODIxG88wpTWUZkhcM3A2HJTb+BbXTFDamHv7FwtRKWQ/ALg==", + "dev": true, + "requires": { + "css-select": "^4.2.1", + "css-tree": "^1.0.0-alpha.39" + }, + "dependencies": { + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + } + } + }, "react-native-toast-notifications": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/react-native-toast-notifications/-/react-native-toast-notifications-3.3.0.tgz", diff --git a/package.json b/package.json index dd5ad00..85007c0 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,9 @@ "jest": "^26.6.3", "react-native-paper-dropdown": "^1.0.7", "react-native-safe-area-context": "4.2.4", - "react-native-screens": "~3.11.1" + "react-native-screens": "~3.11.1", + "react-native-star-rating-widget": "^1.2.0", + "react-native-svg": "^12.3.0" }, "private": true, "eslintConfig": { diff --git a/src/components/albums/AlbumInfo.js b/src/components/albums/AlbumInfo.js index 7144a46..20f9cbe 100644 --- a/src/components/albums/AlbumInfo.js +++ b/src/components/albums/AlbumInfo.js @@ -11,6 +11,7 @@ import SongList from "../songs/SongList"; import AlbumReviews from "./Reviews/AlbumReviews"; import AlbumComments from "./comments/AlbumComments.js"; import { useSWR, ALBUMS_URL, json_fetcher } from "../../util/services"; +import StarRating from 'react-native-star-rating-widget'; export default function AlbumInfo({ modalStatus, setModalStatus }) { const album = modalStatus?.album; @@ -27,9 +28,9 @@ export default function AlbumInfo({ modalStatus, setModalStatus }) { { isPaused: () => !modalStatus.visible } ); - const getAvgScore = () => { - if (album?.score !== 0 && !album?.score) return "-"; - return Math.round(album?.score * 100) / 100; + const hasAvgScore = () => { + if (album?.score !== 0 && !album?.score) return false; + return true; }; useEffect(() => { @@ -58,7 +59,16 @@ export default function AlbumInfo({ modalStatus, setModalStatus }) { {artists} {album?.description} - {"avg. Score: " + getAvgScore()} + { album?.scores_amount ? + {}} + maxStars={5} + style={{alignSelf: "center"}} + animationConfig={{scale: 1}} + /> + : null + } setPlaylistAdd({ visible: true, id: data.id }) From 2126b8d9c03c541b4fcc96d1f454fc2bfdef3a1c Mon Sep 17 00:00:00 2001 From: Tomas Civini Date: Thu, 7 Jul 2022 19:39:01 -0300 Subject: [PATCH 04/11] fix lint --- src/components/albums/AlbumInfo.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/albums/AlbumInfo.js b/src/components/albums/AlbumInfo.js index 20f9cbe..6d2e0e6 100644 --- a/src/components/albums/AlbumInfo.js +++ b/src/components/albums/AlbumInfo.js @@ -28,11 +28,6 @@ export default function AlbumInfo({ modalStatus, setModalStatus }) { { isPaused: () => !modalStatus.visible } ); - const hasAvgScore = () => { - if (album?.score !== 0 && !album?.score) return false; - return true; - }; - useEffect(() => { if (!response.error) return; console.error(response.error); From b78e6f2a6409630ff31696a1f3098c1f8cd21384 Mon Sep 17 00:00:00 2001 From: fdelu Date: Mon, 11 Jul 2022 19:24:29 -0300 Subject: [PATCH 05/11] Improve performance when switching songs, add subscription level and currently played song information --- package-lock.json | 2 +- src/components/ThemeProvider.js | 1 - .../subscriptions/ManageSubscription.js | 16 +++-- .../account/subscriptions/SubButton.js | 24 +++++++ src/components/albums/AlbumInfo.js | 34 ++++----- src/components/general/SubIcon.js | 26 +++++++ src/components/songs/PlayableSongItem.js | 70 ++++++++++++------- src/components/songs/SongItem.js | 17 +++-- 8 files changed, 135 insertions(+), 55 deletions(-) create mode 100644 src/components/account/subscriptions/SubButton.js create mode 100644 src/components/general/SubIcon.js diff --git a/package-lock.json b/package-lock.json index 2e79b0c..a223160 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52613,4 +52613,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/components/ThemeProvider.js b/src/components/ThemeProvider.js index 7ada4ed..40153ed 100644 --- a/src/components/ThemeProvider.js +++ b/src/components/ThemeProvider.js @@ -113,7 +113,6 @@ const LightTheme = { ...PaperDefaultTheme.colors, ...NavigationDefaultTheme.colors, primary: "#3498db", - accent: "#f1c40f", info: "#555555", }, }; diff --git a/src/components/account/subscriptions/ManageSubscription.js b/src/components/account/subscriptions/ManageSubscription.js index 22e9063..2c26e6b 100644 --- a/src/components/account/subscriptions/ManageSubscription.js +++ b/src/components/account/subscriptions/ManageSubscription.js @@ -15,6 +15,7 @@ import { useSubLevels } from "../../../util/requests"; import SubscribeDialog from "./SubscribeDialog"; import styles from "../../styles"; import Portal from "../../general/NavigationAwarePortal"; +import SubIcon from "../../general/SubIcon"; const getRemainingDays = (str_date) => { if (!str_date) return null; @@ -116,18 +117,19 @@ export default function ManageSubscription() { Change Subscription - {subLevels - ?.filter((sub) => sub.level != user?.sub_level) - .map((sub, i) => ( + {subLevels.map((sub, i) => ( + + - ))} + + ))} { + const theme = useTheme(); + return ( + <> + {sub?.name} + + ); +}; + +export default SubButton; + +SubButton.propTypes = { + sub: PropTypes.shape({ + level: PropTypes.number.isRequired, + name: PropTypes.string.isRequired, + }).isRequired, +}; diff --git a/src/components/albums/AlbumInfo.js b/src/components/albums/AlbumInfo.js index 6d2e0e6..3e22f18 100644 --- a/src/components/albums/AlbumInfo.js +++ b/src/components/albums/AlbumInfo.js @@ -11,13 +11,10 @@ import SongList from "../songs/SongList"; import AlbumReviews from "./Reviews/AlbumReviews"; import AlbumComments from "./comments/AlbumComments.js"; import { useSWR, ALBUMS_URL, json_fetcher } from "../../util/services"; -import StarRating from 'react-native-star-rating-widget'; +import StarRating from "react-native-star-rating-widget"; export default function AlbumInfo({ modalStatus, setModalStatus }) { const album = modalStatus?.album; - const artists = getArtistsAsString( - album?.songs?.map((song) => song?.artists).flat() - ); const [playlistAdd, setPlaylistAdd] = useState({ visible: false, id: null, @@ -27,6 +24,9 @@ export default function AlbumInfo({ modalStatus, setModalStatus }) { json_fetcher, { isPaused: () => !modalStatus.visible } ); + const artists = getArtistsAsString( + response?.data?.songs?.map((song) => song?.artists).flat() + ); useEffect(() => { if (!response.error) return; @@ -44,26 +44,26 @@ export default function AlbumInfo({ modalStatus, setModalStatus }) { {album?.name} {album?.genre} + {album?.scores_amount ? ( + {}} + maxStars={5} + style={{ alignSelf: "center", marginBottom: 10 }} + animationConfig={{ scale: 1 }} + color="#FBB52C" + starSize={20} + /> + ) : null} - - {artists} + {artists ? {artists} : null} {album?.description} - { album?.scores_amount ? - {}} - maxStars={5} - style={{alignSelf: "center"}} - animationConfig={{scale: 1}} - /> - : null - } setPlaylistAdd({ visible: true, id: data.id }) diff --git a/src/components/general/SubIcon.js b/src/components/general/SubIcon.js new file mode 100644 index 0000000..12ff293 --- /dev/null +++ b/src/components/general/SubIcon.js @@ -0,0 +1,26 @@ +import React from "react"; +import { useTheme } from "react-native-paper"; +import Icon from "react-native-vector-icons/MaterialCommunityIcons"; +import PropTypes from "prop-types"; + +function getIcon(sub_level) { + if (sub_level === 0) return "currency-usd-off"; + if (sub_level === 1) return "star-outline"; + if (sub_level === 2) return "star"; + if (sub_level === 3) return "crown"; + return "file-question-outline"; +} + +const SubIcon = ({ sub_level, ...rest }) => { + const theme = useTheme(); + if (sub_level >= 2) rest.color = theme.colors.primary; + else if (!rest.color) rest.color = theme.colors.info; + rest.style = rest.style ?? { marginRight: 5 }; + return ; +}; + +SubIcon.propTypes = { + sub_level: PropTypes.number.isRequired, +}; + +export default SubIcon; diff --git a/src/components/songs/PlayableSongItem.js b/src/components/songs/PlayableSongItem.js index 82e2f56..6713c04 100644 --- a/src/components/songs/PlayableSongItem.js +++ b/src/components/songs/PlayableSongItem.js @@ -1,41 +1,59 @@ -import React from "react"; +import React, { useCallback, useContext, useState } from "react"; +import { View } from "react-native"; import PropTypes from "prop-types"; import { AudioContext } from "../general/AudioProvider"; import { fetch, SONGS_URL } from "../../util/services"; import SongItem from "./SongItem"; import { ActivityIndicator } from "react-native-paper"; +import { SessionContext } from "../session/SessionProvider"; import { errStr } from "../../util/general"; +import styles from "../styles"; +import SubIcon from "../general/SubIcon"; export default function PlayableSongItem({ data, right }) { - const context = React.useContext(AudioContext); - const [loading, setLoading] = React.useState(false); - - const onPress = async (song) => { - setLoading(true); - try { - let res = await fetch(SONGS_URL + song.id); - song.url = res.file; - context.setSong(song); - context.setPaused(false); - } catch (e) { - const detail = errStr(e); - toast.show(`Could not play song ${song?.name}\n${detail}`); - } finally { - setLoading(false); - } - }; + const { setSong, setPaused, song } = useContext(AudioContext); + const { user } = useContext(SessionContext); + const [loading, setLoading] = useState(false); + const onPress = useCallback( + loading + ? undefined + : async () => { + let song = { ...data }; + setLoading(true); + try { + let res = await fetch(SONGS_URL + song.id); + song.url = res.file; + setSong(song); + setPaused(false); + } catch (e) { + const detail = errStr(e); + toast.show(`Could not play song ${song?.name}\n${detail}`); + } finally { + setLoading(false); + } + }, + [data] + ); return ( onPress(data)} - left={() => ( - + onPress={onPress} + playing={song?.id === data?.id} + left={useCallback( + (props) => ( + + + {loading ? ( + + ) : null} + + ), + [loading, data?.sub_level] + )} + style={[{ paddingHorizontal: 0 }].concat( + data?.sub_level > user?.sub_level ? styles.disabled : [] )} /> ); @@ -49,6 +67,8 @@ PlayableSongItem.propTypes = { name: PropTypes.string.isRequired, }).isRequired ), + id: PropTypes.number, + sub_level: PropTypes.number, }), right: PropTypes.func, }; diff --git a/src/components/songs/SongItem.js b/src/components/songs/SongItem.js index 0221904..e00b170 100644 --- a/src/components/songs/SongItem.js +++ b/src/components/songs/SongItem.js @@ -1,20 +1,27 @@ -import React from "react"; +import React, { memo } from "react"; import PropTypes from "prop-types"; -import { List } from "react-native-paper"; +import { List, useTheme } from "react-native-paper"; import { getArtistsAsString } from "../../util/general"; -export default function SongItem({ data, right, onPress, ...rest }) { +function SongItem({ data, right, playing, ...rest }) { + const theme = useTheme(); return ( onPress(data) : undefined} + titleStyle={ + playing + ? { color: theme.colors.primary, fontWeight: "bold" } + : undefined + } {...rest} /> ); } +export default memo(SongItem); + SongItem.propTypes = { data: PropTypes.shape({ name: PropTypes.string, @@ -23,7 +30,9 @@ SongItem.propTypes = { name: PropTypes.string.isRequired, }).isRequired ), + id: PropTypes.number, }), + playing: PropTypes.bool, right: PropTypes.func, onPress: PropTypes.func, }; From 6d037a19f56804d4ea275e41bb41411da0153ddb Mon Sep 17 00:00:00 2001 From: fdelu Date: Mon, 11 Jul 2022 19:37:53 -0300 Subject: [PATCH 06/11] Don't play unavailable songs for subscription level on album and playlist menu --- .../subscriptions/ManageSubscription.js | 2 +- src/components/general/SubIcon.js | 18 +++++++------- src/components/songs/PlayableSongItem.js | 2 +- src/components/songs/SongList.js | 24 +++++++++++++------ 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/components/account/subscriptions/ManageSubscription.js b/src/components/account/subscriptions/ManageSubscription.js index 2c26e6b..f6634d6 100644 --- a/src/components/account/subscriptions/ManageSubscription.js +++ b/src/components/account/subscriptions/ManageSubscription.js @@ -119,7 +119,7 @@ export default function ManageSubscription() { {subLevels.map((sub, i) => ( - +