WebUI: Implement double-click behavior controls

PR #21000.
This commit is contained in:
Hanabishi 2024-07-05 11:34:05 +05:00 committed by GitHub
parent d87533bf4c
commit b52fa98a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 0 deletions

View file

@ -1536,6 +1536,20 @@ window.qBittorrent.DynamicTable = (function() {
this._this.selectRow(this.rowId);
const row = this._this.rows.get(this.rowId);
const state = row["full_data"].state;
const prefKey =
(state !== "uploading")
&& (state !== "stoppedUP")
&& (state !== "forcedUP")
&& (state !== "stalledUP")
&& (state !== "queuedUP")
&& (state !== "checkingUP")
? "dblclick_download"
: "dblclick_complete";
if (LocalPreferences.get(prefKey, "1") !== "1")
return true;
if (state.includes("stopped"))
startFN();
else