From aa82b340ace450050e0102c74a5da0b660183cc6 Mon Sep 17 00:00:00 2001 From: 22 <60903333+nini22P@users.noreply.github.com> Date: Thu, 13 Jun 2024 00:52:26 +0800 Subject: [PATCH] fix: change account bug --- src/pages/Setting.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Setting.tsx b/src/pages/Setting.tsx index a62a203..d258512 100644 --- a/src/pages/Setting.tsx +++ b/src/pages/Setting.tsx @@ -59,13 +59,14 @@ const Setting = () => { const handleCloseAccountsDialog = () => setAccountsDialogOpen(false) const handleChangeAccount = (index: number) => { + handleCloseAccountsDialog() + if (currentAccount === index) return updateCurrentAccount(index) updateFolderTree(['/']) updateHistoryList(null) updatePlaylists(null) resetPlayQueue() resetPlayer() - handleCloseAccountsDialog() } const handleLogout = (account: AccountInfo) => {