Fix materialized queries and reload

This commit is contained in:
Zef Hemel
2022-10-10 18:19:08 +02:00
parent 820fc83c8b
commit 61bf715c9f
5 changed files with 31 additions and 22 deletions
+6 -6
View File
@@ -582,12 +582,10 @@ export class Editor {
return actualResult;
}
reloadPage() {
async reloadPage() {
console.log("Reloading page");
safeRun(async () => {
clearTimeout(this.saveTimeout);
await this.loadPage(this.currentPage!);
});
clearTimeout(this.saveTimeout);
await this.loadPage(this.currentPage!);
}
focus() {
@@ -614,7 +612,9 @@ export class Editor {
if (previousPage) {
this.saveState(previousPage);
this.space.unwatchPage(previousPage);
await this.save(true);
if (previousPage !== pageName) {
await this.save(true);
}
}
this.viewDispatch({