Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ All notable changes to this project will be documented in this file.
The export of the file picker Vue component is deprecated and will be removed in the next version.
Instead please use the `FilePickerBuilder`.

The `Dialog.hide` method is deprecated.
Instead only user interaction should close dialogs,
for this use the promise returned by `Dialog.show` which will resolve if the user answered the dialog and rejected if the user aborted (closed) the dialog.

## 6.1.1
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-dialogs/compare/v6.1.0...v6.1.1)

Expand Down
4 changes: 3 additions & 1 deletion lib/dialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Dialog {
* Spawn and show the dialog - if already open the previous instance will be destroyed
* @return Promise that resolves when the dialog is answered successfully and rejects on close
*/
show() {
async show() {
if (this.#dialog) {
this.#dialog.$destroy()
}
Expand All @@ -75,6 +75,8 @@ export class Dialog {

/**
* Hide and destroy the current dialog instance
*
* @deprecated use the promise of the `show` methods for the user interaction.
*/
hide() {
this.#dialog?.$destroy()
Expand Down