Commit 14a47598 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #10001 TIME 0:05 fix delete delay

parent a86a885c
......@@ -89,7 +89,9 @@ export class Office365SharepointViewerComponent implements OnInit, AfterViewInit
this.triggerCloseEditor.emit();
this.deleteDocument();
setTimeout(() => {
this.deleteDocument();
}, 10000);
}
canLaunchOffice365Sharepoint() {
......@@ -170,18 +172,16 @@ export class Office365SharepointViewerComponent implements OnInit, AfterViewInit
deleteDocument() {
return new Promise((resolve) => {
setTimeout(() => {
this.http.delete('../rest/office365/' + this.documentId).pipe(
tap(() => {
resolve(true);
}),
catchError((err) => {
this.notify.handleErrors(err);
this.triggerCloseEditor.emit();
return of(false);
}),
).subscribe();
}, 10000);
this.http.delete('../rest/office365/' + this.documentId).pipe(
tap(() => {
resolve(true);
}),
catchError((err) => {
this.notify.handleErrors(err);
this.triggerCloseEditor.emit();
return of(false);
}),
).subscribe();
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment