fix: various infinite timeline issues
This commit is contained in:
parent
aeaa230162
commit
87b61d7717
1 changed files with 11 additions and 4 deletions
|
@ -288,7 +288,7 @@ media_theme_pref();
|
|||
const goals = [150, 250, 500, 1000];
|
||||
|
||||
track_element.setAttribute("data-scroll", "0");
|
||||
scroll_element.addEventListener("scroll", (e) => {
|
||||
scroll_element.addEventListener("scroll", (_) => {
|
||||
track_element.setAttribute("data-scroll", scroll_element.scrollTop);
|
||||
|
||||
for (const goal of goals) {
|
||||
|
@ -635,7 +635,6 @@ media_theme_pref();
|
|||
return;
|
||||
}
|
||||
|
||||
// biome-ignore lint/style/noParameterAssign: no it isn't
|
||||
page += 1;
|
||||
await load_partial();
|
||||
})
|
||||
|
@ -837,7 +836,6 @@ media_theme_pref();
|
|||
}, time_until_remove * 1000);
|
||||
|
||||
const count_interval = setInterval(() => {
|
||||
// biome-ignore lint/style/noParameterAssign: no it isn't
|
||||
time_until_remove -= 1;
|
||||
timer.innerText = time_until_remove;
|
||||
}, 1000);
|
||||
|
@ -1195,6 +1193,7 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
self.IO_DATA_SEEN_IDS = [];
|
||||
self.IO_DATA_WAITING = false;
|
||||
self.IO_HAS_LOADED_AT_LEAST_ONCE = false;
|
||||
self.IO_DATA_DISCONNECTED = false;
|
||||
|
||||
if (!paginated_mode) {
|
||||
self.IO_DATA_OBSERVER.observe(self.IO_DATA_MARKER);
|
||||
|
@ -1207,7 +1206,10 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
|
||||
setTimeout(() => {
|
||||
if (!self.IO_HAS_LOADED_AT_LEAST_ONCE) {
|
||||
self.io_load_data();
|
||||
// reload
|
||||
Turbo.visit(window.location.href);
|
||||
self.IO_DATA_OBSERVER.disconnect();
|
||||
console.log("timeline load fail :(");
|
||||
}
|
||||
}, 1500);
|
||||
|
||||
|
@ -1243,12 +1245,17 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
|
|||
loading_skel.remove();
|
||||
}
|
||||
|
||||
if (self.IO_DATA_DISCONNECTED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
text.includes(`!<!-- observer_disconnect_${window.BUILD_CODE} -->`)
|
||||
) {
|
||||
console.log("io_data_end; disconnect");
|
||||
self.IO_DATA_OBSERVER.disconnect();
|
||||
self.IO_DATA_ELEMENT.innerHTML += text;
|
||||
self.IO_DATA_DISCONNECTED = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue