From 880cfe963f33e09ad2a3c8db0538dbd6a97b2909 Mon Sep 17 00:00:00 2001 From: EbonCorvin <153107703+EbonCorvin@users.noreply.github.com> Date: Wed, 26 Jun 2024 07:30:08 -0400 Subject: [PATCH] Allow user to review bulk unfriend list before processing (#834) Co-authored-by: EbonCorvin <{ID}+{username}@users.noreply.github.com> --- html/src/app.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 0b897da4..d29be318 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -22436,12 +22436,11 @@ speechSynthesis.getVoices(); } } $app.methods.showBulkUnfriendSelectionConfirm = function () { - var elementsTicked = 0; - for (var ctx of this.friendsListTable.data) { - if (ctx.$selected) { - elementsTicked++; - } - } + var pendingUnfriendList = this.friendsListTable.data.reduce( + (acc, ctx, i) => (ctx.$selected && acc.push(ctx.displayName), acc), + [] + ); + var elementsTicked = pendingUnfriendList.length; if (elementsTicked === 0) { return; } @@ -22454,6 +22453,9 @@ speechSynthesis.getVoices(); confirmButtonText: 'Confirm', cancelButtonText: 'Cancel', type: 'info', + showInput: true, + inputType: 'textarea', + inputValue: pendingUnfriendList.join('\r\n'), callback: (action) => { if (action === 'confirm') { this.bulkUnfriendSelection();