Skip to content
Snippets Groups Projects
Commit d812a1ee authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #11405 TIME 0:10 added confirm modal when un-follow

parent e324f978
No related branches found
No related tags found
No related merge requests found
......@@ -334,19 +334,16 @@ export class FollowedDocumentListComponent implements OnInit {
}
unfollowMail(row: any) {
this.http.request('DELETE', '../../rest/resources/unfollow', { body: { resources: [row.resId] } }).pipe(
tap(() => {
this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: this.lang.delete, msg: this.lang.stopFollowingAlert } });
this.dialogRef.afterClosed().pipe(
filter((data: string) => data === 'ok'),
exhaustMap(() => this.http.request('DELETE', '../../rest/resources/unfollow' , { body: { resources: [row.resId] } })),
tap((data: any) => {
this.menuShortcut.nbResourcesFollowed--;
this.initResultList();
}),
catchError((err: any) => {
this.notify.handleErrors(err);
return of(false);
})
).subscribe();
row.mailTracking = !row.mailTracking;
}
viewDocument(row: any) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment