From f7a09a646dd868d46c54f3e3b52edee02ebbd9d9 Mon Sep 17 00:00:00 2001 From: Vincent CLAVIEN Date: Sun, 1 Dec 2024 10:45:20 +0100 Subject: [PATCH] attempted fix for issue #1 --- index.html | 8 ++++---- js/main.js | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 1349cd3..09d8c3a 100644 --- a/index.html +++ b/index.html @@ -800,7 +800,7 @@
- - + + diff --git a/js/main.js b/js/main.js index 06b78e7..11282f0 100644 --- a/js/main.js +++ b/js/main.js @@ -113,12 +113,14 @@ const filesStore = { document.getElementById(id).focus(); }, 100); }, - resetFilters() { + resetFilters(userAction) { this.filters = JSON.parse(JSON.stringify(this.filtersDefault)); - this.currentPage = 1; - this.filtersActive = false; - scrollTootsToTop(); - pagingUpdated(); + if (userAction) { + this.currentPage = 1; + this.filtersActive = false; + scrollTootsToTop(); + pagingUpdated(); + } }, get filteredToots() { @@ -850,7 +852,7 @@ function loadJsonFile(name) { delete data.orderedItems; Alpine.store("files").outbox = data; - Alpine.store("files").resetFilters(); + Alpine.store("files").resetFilters(false); Alpine.store("files").loaded.outbox = true; } // outbox.json