From 6fbbec976689e033233d699a0102940d48040a73 Mon Sep 17 00:00:00 2001 From: stCarolas Date: Mon, 4 Mar 2024 12:21:01 +0300 Subject: [PATCH] publish zero counter for player-info widgets in case of personal playlist --- src/logic/playlist/Playlist.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logic/playlist/Playlist.ts b/src/logic/playlist/Playlist.ts index 458bdf0..01545d2 100644 --- a/src/logic/playlist/Playlist.ts +++ b/src/logic/playlist/Playlist.ts @@ -150,8 +150,8 @@ class Playlist { triggerListeners() { publish(this.topic, { - count: this._index === null ? 0 : this._songs.length, - number: this._index === null ? 0 : this._index, + count: this._index === null || this._type === PLAYLIST_TYPE.PERSONAL ? 0 : this._songs.length, + number: this._index === null || this._type === PLAYLIST_TYPE.PERSONAL ? 0 : this._index, }); this._listeners.forEach((listener) => { listener.trigger(this);