Fix Clear Recently played
This commit is contained in:
parent
7b70e55895
commit
abcc33ba38
2 changed files with 8 additions and 0 deletions
|
|
@ -303,6 +303,13 @@ const syncManager = {
|
|||
await this._updateUserJSON(user.$id, 'history', newHistory);
|
||||
},
|
||||
|
||||
async clearHistory() {
|
||||
const user = authManager.user;
|
||||
if (!user) return;
|
||||
|
||||
await this._updateUserJSON(user.$id, 'history', []);
|
||||
},
|
||||
|
||||
async syncUserPlaylist(playlist, action) {
|
||||
const user = authManager.user;
|
||||
if (!user) return;
|
||||
|
|
|
|||
1
js/ui.js
1
js/ui.js
|
|
@ -4451,6 +4451,7 @@ export class UIRenderer {
|
|||
if (confirm('Clear all recently played tracks? This cannot be undone.')) {
|
||||
try {
|
||||
await db.clearHistory();
|
||||
await syncManager.clearHistory();
|
||||
container.innerHTML = createPlaceholder("You haven't played any tracks yet.");
|
||||
clearBtn.style.display = 'none';
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue