Skip to content

Commit

Permalink
Cleanup of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
chunkypixel committed Apr 27, 2019
1 parent e2ad3b3 commit c7e58aa
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 28 deletions.
24 changes: 12 additions & 12 deletions out/content/pages/spriteEditor/main.js

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions out/pages/spriteeditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion out/pages/spriteeditor.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions src/pages/spriteeditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ export class SpriteEditorPage implements vscode.Disposable {
}
};

// TODO: this needs fixing
// Process
vscode.window.showSaveDialog(options).then(async fileUri => {
await vscode.window.showSaveDialog(options).then(async fileUri => {
if (fileUri) {
// Process
try {
Expand All @@ -242,7 +243,7 @@ export class SpriteEditorPage implements vscode.Disposable {
command: command,
status: 'ok'
});
return true;
return true;
}

// Set
Expand All @@ -251,16 +252,19 @@ export class SpriteEditorPage implements vscode.Disposable {
} catch (error) {
errorMessage = error;
}

// Result
this.currentPanel!.webview.postMessage({
command: command,
status: 'error',
errorMessage: errorMessage
});
return false;
}
});

// Result
this.currentPanel!.webview.postMessage({
command: command,
status: 'error',
errorMessage: errorMessage
});
return false;
return true;
}

}

0 comments on commit c7e58aa

Please sign in to comment.