diff --git a/crates/app/src/public/js/atto.js b/crates/app/src/public/js/atto.js index 480713f..93e4bea 100644 --- a/crates/app/src/public/js/atto.js +++ b/crates/app/src/public/js/atto.js @@ -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}` : ""} }); // 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) {