fix favicon, playlist subscription only

This commit is contained in:
Thomas Demirdjian
2026-03-12 13:46:19 +01:00
parent ebdf9862a7
commit 5c2bdc593c
14 changed files with 250 additions and 57 deletions
+13 -7
View File
@@ -7,6 +7,7 @@ import { background, icons } from '../../assets'
import MoreMenu from '../../components/MoreMenu'
import { playlistsRef, projectsRef } from '../../config/firebase'
import useDataFromArrayDocId from '../../hooks/useDataFromArrayId'
import usePlaylistCreationGuard from '../../hooks/usePlaylistCreationGuard'
import useDataFromRef from '../../hooks/useDataFromRef'
import useNavigateToMusicDetails from '../../hooks/useNavigateToMusicDetails'
import usePlayer from '../../hooks/usePlayer'
@@ -22,6 +23,7 @@ const AllMyPlaylist = ({ route }) => {
const { playListId } = route?.params || {}
const [, setTooltip] = useGlobal('_tooltip')
const { userPlaylists = [] } = useUser()
const ensureCanCreatePlaylist = usePlaylistCreationGuard()
const [selectedPlaylistId, setSelectedPlaylistId] = useState(playListId || null)
const { data: playlist } = useDataFromRef({
ref: selectedPlaylistId ? playlistsRef.doc(selectedPlaylistId) : null,
@@ -140,6 +142,16 @@ const AllMyPlaylist = ({ route }) => {
})
}, [playlist?.musics, selectedPlaylistId])
const handleCreatePlaylistPress = useCallback(() => {
if (!ensureCanCreatePlaylist()) {
return
}
SheetManager.show('Playlist', {
payload: { startAtCreate: true },
})
}, [ensureCanCreatePlaylist])
return (
<Page
headerType="NAVIGATION"
@@ -233,13 +245,7 @@ const AllMyPlaylist = ({ route }) => {
)
})}
</View>
<Pressable
onPress={() =>
SheetManager.show('Playlist', {
payload: { startAtCreate: true },
})
}
>
<Pressable onPress={handleCreatePlaylistPress}>
<View
style={{
borderRadius: 12,