This commit is contained in:
zsviczian
2024-09-03 13:11:22 +02:00
parent e447cc3b67
commit 15b400a3d9
4 changed files with 14 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "2.4.1-rc-1",
"version": "2.4.1",
"minAppVersion": "1.1.6",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-excalidraw-plugin",
"name": "Excalidraw",
"version": "2.4.0",
"version": "2.4.1",
"minAppVersion": "1.1.6",
"description": "An Obsidian plugin to edit and view Excalidraw drawings",
"author": "Zsolt Viczian",

View File

@@ -1782,7 +1782,16 @@ export default class ExcalidrawView extends TextFileView {
async onUnloadFile(file: TFile): Promise<void> {
//deliberately not calling super.onUnloadFile() to avoid autosave (saved in unload)
(process.env.NODE_ENV === 'development') && DEBUGGING && debug(this.onUnloadFile,`ExcalidrawView.onUnloadFile, file:${this.file?.name}`);
while (this.semaphores.saving) await sleep(50); //https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1988
let counter = 0;
while (this.semaphores.saving) {
await sleep(50); //https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1988
if(counter++ === 15) {
new Notice(t("SAVE_IS_TAKING_LONG"));
}
if(counter === 80) {
new Notice(t("SAVE_IS_TAKING_VERY_LONG"));
}
}
}
private async forceSaveIfRequired():Promise<boolean> {

View File

@@ -169,6 +169,8 @@ export default {
WELCOME_LEARN_LINK: "Sign up for the Visual Thinking Workshop",
WELCOME_DONATE_ARIA: "Donate to support Excalidraw-Obsidian",
WELCOME_DONATE_LINK: 'Say "Thank You" & support the plugin.',
SAVE_IS_TAKING_LONG: "Saving your previous file is taking a long time. Please wait...",
SAVE_IS_TAKING_VERY_LONG: "For better performance, consider splitting large drawings into several smaller files.",
//settings.ts
RELEASE_NOTES_NAME: "Display Release Notes after update",