From c6e01f43344f3fc1373d8c7d064d91386baa8786 Mon Sep 17 00:00:00 2001 From: Robonau <30987265+Robonau@users.noreply.github> Date: Mon, 11 Nov 2024 22:05:17 +0000 Subject: [PATCH] change single char variables to properly named ones --- src/widgets/suwayomi/component.jsx | 4 ++-- src/widgets/suwayomi/proxy.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/suwayomi/component.jsx b/src/widgets/suwayomi/component.jsx index eac51788..a52773bb 100644 --- a/src/widgets/suwayomi/component.jsx +++ b/src/widgets/suwayomi/component.jsx @@ -11,12 +11,12 @@ import useWidgetAPI from "utils/proxy/use-widget-api"; function makeFields(Fields = []) { let fields = Fields ?? []; if (fields.length === 0) { - fields = ["download", "nondownload", "read", "unread"]; + fields = ["download", "nonDownload", "read", "unRead"]; } if (fields.length > 4) { fields.length = 4; } - fields = fields.map((f) => f.toLowerCase()); + fields = fields.map((field) => field.toLowerCase()); return fields; } diff --git a/src/widgets/suwayomi/proxy.js b/src/widgets/suwayomi/proxy.js index 24e63f9f..261e8457 100644 --- a/src/widgets/suwayomi/proxy.js +++ b/src/widgets/suwayomi/proxy.js @@ -97,10 +97,10 @@ const countsToExtract = { function makeBody(fields, category = "all") { if (Number.isNaN(Number(category))) { let query = ""; - fields.forEach((f) => { + fields.forEach((field) => { query += ` - ${f}: chapters( - condition: {${countsToExtract[f].gqlCondition}} + ${field}: chapters( + condition: {${countsToExtract[field].gqlCondition}} filter: {inLibrary: {equalTo: true}} ) { totalCount @@ -179,7 +179,7 @@ function extractCounts(responseJSON, fields) { function makeFields(Fields = []) { let fields = Fields ?? []; if (fields.length === 0) { - fields = ["download", "nondownload", "read", "unread"]; + fields = ["download", "nonDownload", "read", "unRead"]; } if (fields.length > 4) { fields.length = 4;