From 89394bf428c31baae9da8fddcf24816a6989af0f Mon Sep 17 00:00:00 2001 From: icxes Date: Mon, 30 Mar 2026 22:31:42 +0300 Subject: [PATCH] simplify autogrid checks --- copyparty/web/browser.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index c142223e..bf5fbae6 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -7683,7 +7683,7 @@ var treectl = (function () { } } - if (sread('gridauto') == 1) + if (jread('gridauto', false) && !jread('griden', false)) autogrid(res); if (url) setTimeout(asdf, 1); else asdf(); @@ -7864,11 +7864,7 @@ var treectl = (function () { var iratio = fcount > 0 ? (icount / fcount) * 100 : 0; var threshold = jread('ga_thresh', 70); - if (jread('griden', 0) == 1) - thegrid.en = true; - else if (thegrid.en && !thegrid.gaen) - thegrid.en = false; - else if (iratio >= threshold) + if (iratio >= threshold) thegrid.en = true; else thegrid.en = false;