mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 19:37:35 +08:00
优化格式 去掉一层嵌套
This commit is contained in:
@@ -243,8 +243,7 @@ const toLikeSomething =
|
||||
thingName: string,
|
||||
request: () => (id: number, t: 1 | 2) => Promise<{ code: number }>,
|
||||
update: () => Promise<void>,
|
||||
) => {
|
||||
return debounce(
|
||||
) => debounce(
|
||||
async (id: number, like: boolean) => {
|
||||
// 错误情况
|
||||
if (!id) return;
|
||||
@@ -270,7 +269,6 @@ const toLikeSomething =
|
||||
300,
|
||||
{ leading: true, trailing: false },
|
||||
);
|
||||
};
|
||||
|
||||
// 收藏/取消收藏歌单
|
||||
export const toLikePlaylist = toLikeSomething("收藏", "歌单", () => likePlaylist, updateUserLikePlaylist)
|
||||
|
||||
Reference in New Issue
Block a user