fix: client timeline load disconnect issue

This commit is contained in:
trisua 2025-06-26 13:58:10 -04:00
parent 904944f5d3
commit 4b7808e70b

View file

@ -878,7 +878,7 @@ media_theme_pref();
})();
// ui ns
(() => {
(async () => {
const self = reg_ns("ui");
window.SETTING_SET_FUNCTIONS = [];
@ -1151,6 +1151,12 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
});
// intersection observer infinite scrolling
const obs = (await ns("ui")).IO_DATA_OBSERVER;
if (obs) {
console.log("get lost old observer");
obs.disconnect();
}
self.IO_DATA_OBSERVER = new IntersectionObserver(
async (entries) => {
for (const entry of entries) {