Skip to content

Commit

Permalink
fix(user.ts): Replace recents store with backend result
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Aug 6, 2024
1 parent b97ebd8 commit 4458faa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async function logOut(toLogin: boolean = true): Promise<void> {
*/
function loadRecents(tracks: RemoteInfo[] | null = null): void {
if (tracks) {
useRecents.setState(tracks);
useRecents.setState(tracks, true);
} else {
const user = useUser.getState() as User;
if (!user) {
Expand All @@ -178,7 +178,7 @@ function loadRecents(tracks: RemoteInfo[] | null = null): void {
return track;
});

useRecents.setState(recents);
useRecents.setState(recents, true);
log.info(`Loaded ${user.recentlyPlayed.length} recent tracks!`);
}
}
Expand Down

0 comments on commit 4458faa

Please sign in to comment.