Rebounce navigation events

This commit is contained in:
2026-01-30 12:26:36 +01:00
parent 5ce6b0c417
commit d3d26c6ae1
8 changed files with 56 additions and 26 deletions

View File

@@ -53,12 +53,19 @@ export class FSNavigator {
}
}
last_requested_path: string = ""
navigate = async (path: string, push_history: boolean) => {
if (path === this.last_requested_path) {
console.debug("FSNavigator: Requested path is equal to current path. Debouncing")
return
}
this.last_requested_path = path
if (path[0] !== "/") {
path = "/" + path
}
console.debug("Navigating to path", path, push_history)
console.debug("FSNavigator: Navigating to path", path, push_history)
try {
loading_start()