Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Jan 21, 2025
1 parent 1ba59cb commit 60cb4ca
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
13 changes: 8 additions & 5 deletions src/components/miniplayer/View.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ export default () => {
};
const onArtworkPress = () => {
if (artworkOpacity.value === 1) {
return (artworkOpacity.value = withTiming(0, { duration: 100 }, () => {
artworkOpacity.value = withTiming(0, { duration: 100 }, () => {
runOnJS(setLrcVisible)(true);
}));
});
return;
}
if (artworkOpacity.value === 0) {
setLrcVisible(false);
return (artworkOpacity.value = withTiming(1, { duration: 100 }));
artworkOpacity.value = withTiming(1, { duration: 100 });
return;
}
};

Expand All @@ -89,9 +91,10 @@ export default () => {
if (translationY < -height * SnapToRatio) {
return expand();
}
return (miniplayerHeight.value = withTiming(initHeight.value, {
miniplayerHeight.value = withTiming(initHeight.value, {
duration: 250,
}));
});
return;
};

const scrollDragGesture = React.useMemo(
Expand Down
4 changes: 2 additions & 2 deletions src/components/player/controls/useSponsorBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default () => {
const { sponsorBlockEnabled, sponsorBlockCat } = useNoxSetting(
state => state.playerSetting,
);
const [sponsorblock, setSponsorBlock] = useState<SponsorBlockBili[]>([]);
const [sponsorBlock, setSponsorBlock] = useState<SponsorBlockBili[]>([]);

const initSponsorBlock = (song: NoxMedia.Song) => {
if (sponsorBlockEnabled) {
Expand All @@ -21,7 +21,7 @@ export default () => {
};

const checkSponsorBlock = (position: number) => {
for (const sb of sponsorblock) {
for (const sb of sponsorBlock) {
if (
sponsorBlockCat.includes(sb.category) &&
sb.actionType === ActionType.Skip &&
Expand Down
10 changes: 5 additions & 5 deletions src/components/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ export const createStyle = (
alignItems: 'center',
height: 148,
},
gifs: (customStyle.gifs || []) as any,
bkgrdImg: randomChoice(customStyle.backgroundImages || []) as any,
gifs: (customStyle.gifs ?? []) as any,
bkgrdImg: randomChoice(customStyle.backgroundImages ?? []) as any,
bkgrdImgLandscape: randomChoice(
customStyle.backgroundImagesLandscape || [],
customStyle.backgroundImagesLandscape ?? [],
) as any,
loadingIcon: customStyle.loadingIcon as any,
progressThumbImage: customStyle.progressThumbImage as any,
progressThumbImageLeftDrag: (customStyle.progressThumbImageLeftDrag ||
progressThumbImageLeftDrag: (customStyle.progressThumbImageLeftDrag ??
customStyle.progressThumbImage) as any,
progressThumbImageRightDrag: (customStyle.progressThumbImageRightDrag ||
progressThumbImageRightDrag: (customStyle.progressThumbImageRightDrag ??
customStyle.progressThumbImage) as any,
biliGarbCard: customStyle.biliGarbCard as any,
thumbupSVGA: customStyle.thumbupSVGA as any,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mediafetch/acfunvideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const export2URL = (song: NoxMedia.Song) =>
`https://www.youtube.com/watch?v=${song.bvid}`;

export default {
regexSearchMatch: /acfun\.cn\/v\/(ac[0-9]+)/,
regexSearchMatch: /acfun\.cn\/v\/(ac\d+)/,
regexFetch,
regexResolveURLMatch: /^acfun-/,
resolveURL,
Expand Down

0 comments on commit 60cb4ca

Please sign in to comment.