server optimizations

This commit is contained in:
KingKDot
2026-04-19 00:20:35 -05:00
parent 15ec9f5992
commit 4cba196a12
4 changed files with 35 additions and 27 deletions
+9 -8
View File
@@ -11,7 +11,6 @@ import {
requestThumbnail,
markManualDisconnect,
} from "./data.js";
import { initCountryPicker } from "./country-picker.js";
const grid = document.getElementById("grid");
const totalPill = document.getElementById("total-pill");
@@ -620,13 +619,15 @@ filterGroupSelect?.addEventListener("change", (e) => {
loadWithOptions({ force: true, reorder: true });
});
initCountryPicker((code) => {
state.filterCountry = code;
localStorage.setItem(PREF_FILTER_COUNTRY_KEY, code);
state.page = 1;
state.lastDigest = "";
loadWithOptions({ force: true, reorder: true });
}, localStorage.getItem(PREF_FILTER_COUNTRY_KEY) || "all");
import("./country-picker.js").then(({ initCountryPicker }) => {
initCountryPicker((code) => {
state.filterCountry = code;
localStorage.setItem(PREF_FILTER_COUNTRY_KEY, code);
state.page = 1;
state.lastDigest = "";
loadWithOptions({ force: true, reorder: true });
}, localStorage.getItem(PREF_FILTER_COUNTRY_KEY) || "all");
});
(function restoreFilterStatus() {
const savedStatus = localStorage.getItem(PREF_FILTER_STATUS_KEY);