From 642a9c29ebf016ffd85f2569adedef814b3abb36 Mon Sep 17 00:00:00 2001 From: Carmelo Scandaliato <8927157+cascandaliato@users.noreply.github.com> Date: Mon, 29 Jul 2024 04:20:21 -0400 Subject: [PATCH] WebUI: remove deleted torrents even if they are currently filtered out Remove the torrent row regardless of it being visible. I've also removed the return value because: * it doesn't appear to be used by any caller; * other functions (e.g. updateRowData) do not return any value; * it's not clear whether true refers to the torrent being removed from the list of all torrents or just the visible ones. Closes #21070. PR #21071. --- src/webui/www/private/scripts/dynamicTable.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 2ff251804..c6674ca28 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -827,13 +827,11 @@ window.qBittorrent.DynamicTable ??= (() => { removeRow: function(rowId) { this.selectedRows.erase(rowId); - const tr = this.getTrByRowId(rowId); - if (tr !== null) { - tr.destroy(); + if (this.rows.has(rowId)) this.rows.erase(rowId); - return true; - } - return false; + const tr = this.getTrByRowId(rowId); + if (tr !== null) + tr.destroy(); }, clear: function() {