mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
refactor: 将 enum key的格式改为 PascalCase
This commit is contained in:
parent
0061a66124
commit
7e892997bd
36 changed files with 141 additions and 142 deletions
|
|
@ -23,7 +23,6 @@ import useTracks from '@/renderer/hooks/useTracks'
|
|||
import useUserAlbums, {
|
||||
useMutationLikeAAlbum,
|
||||
} from '@/renderer/hooks/useUserAlbums'
|
||||
import useUser from '@/renderer/hooks/useUser'
|
||||
|
||||
const PlayButton = ({
|
||||
album,
|
||||
|
|
@ -38,7 +37,7 @@ const PlayButton = ({
|
|||
const isThisAlbumPlaying = useMemo(
|
||||
() =>
|
||||
playerSnapshot.mode === PlayerMode.TrackList &&
|
||||
playerSnapshot.trackListSource?.type === TrackListSourceType.ALBUM &&
|
||||
playerSnapshot.trackListSource?.type === TrackListSourceType.Album &&
|
||||
playerSnapshot.trackListSource?.id === album?.id,
|
||||
[
|
||||
playerSnapshot.mode,
|
||||
|
|
@ -50,7 +49,7 @@ const PlayButton = ({
|
|||
|
||||
const isPlaying =
|
||||
isThisAlbumPlaying &&
|
||||
[PlayerState.PLAYING, PlayerState.LOADING].includes(playerSnapshot.state)
|
||||
[PlayerState.Playing, PlayerState.Loading].includes(playerSnapshot.state)
|
||||
|
||||
const wrappedHandlePlay = () => {
|
||||
if (isThisAlbumPlaying) {
|
||||
|
|
@ -301,7 +300,7 @@ const MoreAlbum = ({ album }: { album: Album | undefined }) => {
|
|||
albums={
|
||||
filteredAlbums.length ? filteredAlbums : albums?.hotAlbums || []
|
||||
}
|
||||
subtitle={Subtitle.TYPE_RELEASE_YEAR}
|
||||
subtitle={Subtitle.TypeReleaseYear}
|
||||
isSkeleton={isLoading}
|
||||
rows={1}
|
||||
navigateCallback={scrollToTop}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue