nodebb-plugin-ezoic-infinite 1.8.8 → 1.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/client.js +5 -0
package/package.json
CHANGED
package/public/client.js
CHANGED
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
const MAX_DESTROY_BATCH = 4; // ids max par destroyPlaceholders(...ids)
|
|
90
90
|
const DESTROY_FLUSH_MS = 30; // micro-buffer destroy pour lisser les rafales
|
|
91
91
|
const BURST_COOLDOWN_MS = 100; // délai min entre deux déclenchements de burst
|
|
92
|
+
const MIN_RECYCLE_AGE_DESKTOP_MS = 3000; // évite le flash show→recycle trop rapide sur PC
|
|
92
93
|
|
|
93
94
|
// Marges IO larges et fixes — observer créé une seule fois au boot
|
|
94
95
|
const IO_MARGIN_DESKTOP = '2500px 0px 2500px 0px';
|
|
@@ -472,6 +473,10 @@ function recycleAndMove(klass, targetEl, newKey) {
|
|
|
472
473
|
for (const wrap of S.wrapByKey.values()) {
|
|
473
474
|
if (!wrap?.isConnected || !wrap.classList?.contains(WRAP_CLASS) || !wrap.classList.contains(klass)) continue;
|
|
474
475
|
try {
|
|
476
|
+
if (!isMobile()) {
|
|
477
|
+
const shownTs = parseInt(wrap.getAttribute(A_SHOWN) || '0', 10);
|
|
478
|
+
if (shownTs > 0 && (ts() - shownTs) < MIN_RECYCLE_AGE_DESKTOP_MS) continue;
|
|
479
|
+
}
|
|
475
480
|
const rect = wrap.getBoundingClientRect();
|
|
476
481
|
const isAbove = rect.bottom <= farAbove;
|
|
477
482
|
const isBelow = rect.top >= farBelow;
|