From bb67a1f25365b2abe83132be703863bee3944ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Mon, 12 Jul 2021 23:21:58 +0200 Subject: [PATCH] Fix: Hitting backspace on empty search results in posters being deleted one by one --- dist/plex-meets-homeassistant.js | 4 +--- src/plex-meets-homeassistant.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 31b7fda..348f6af 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -20745,7 +20745,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { if (!this.detailsShown && window.innerHeight + window.scrollY > height + getOffset(this.content).top - 300 && this.renderedItems > 0) { - this.maxRenderCount = this.renderedItems - 1 + this.columnsCount * (loadAdditionalRowsCount * 2); + this.maxRenderCount = this.renderedItems + this.columnsCount * (loadAdditionalRowsCount * 2); this.renderMovieElems(); this.calculatePositions(); } @@ -20873,7 +20873,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { } }); } - console.log(realEntityString); }; const entityOrig = entity; if (lodash.isString(entityOrig)) { @@ -20886,7 +20885,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { processEntity(entity, entityStr); }); } - console.log(entity); this.loading = true; this.renderPage(); try { diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 0f2245d..5cb28b9 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -151,7 +151,7 @@ class PlexMeetsHomeAssistant extends HTMLElement { window.innerHeight + window.scrollY > height + getOffset(this.content).top - 300 && this.renderedItems > 0 ) { - this.maxRenderCount = this.renderedItems - 1 + this.columnsCount * (loadAdditionalRowsCount * 2); + this.maxRenderCount = this.renderedItems + this.columnsCount * (loadAdditionalRowsCount * 2); this.renderMovieElems(); this.calculatePositions(); @@ -287,7 +287,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { } }); } - console.log(realEntityString); }; const entityOrig = entity; @@ -300,7 +299,6 @@ class PlexMeetsHomeAssistant extends HTMLElement { processEntity(entity, entityStr); }); } - console.log(entity); this.loading = true; this.renderPage(); try {