Label of following songs showed only on second element of first page or first element of other pages (#89)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Reviewed-on: #89
This commit is contained in:
Mylloon 2023-03-18 19:50:08 +01:00
parent b0fda1d167
commit acaab12450
Signed by: Forgejo
GPG key ID: E72245C752A07631

View file

@ -26,7 +26,11 @@ export const embedListQueue = (
tracks.slice((page - 1) * limit_fields, page * limit_fields).forEach((t, idx) => { tracks.slice((page - 1) * limit_fields, page * limit_fields).forEach((t, idx) => {
const now_playing = idx == 0 && page == 1; const now_playing = idx == 0 && page == 1;
const name = now_playing ? loc.get("c_queue10") : idx == 1 ? loc.get("c_queue11") : "\u200b"; const name = now_playing
? loc.get("c_queue10")
: (idx == 1 && page == 1) || (idx == 0 && page > 1)
? loc.get("c_queue11")
: "\u200b";
const idx_track = now_playing ? "" : `${idx + limit_fields * (page - 1)}. `; const idx_track = now_playing ? "" : `${idx + limit_fields * (page - 1)}. `;
embed.addFields({ embed.addFields({
name, name,