Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mailviewer): Shows confirmation after block/allow sender actions #1662

Merged
Merged
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
8 changes: 5 additions & 3 deletions src/app/mailviewer/rmm7messageactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,13 @@ export class RMM7MessageActions implements MessageActions {
const msg = `Blocking sender: ${param}`;
const snackBarRef = this.snackBar.open(msg);
this.rmmapi.blockSender(param).subscribe((res) => {
snackBarRef.dismiss();
if ( res.status === 'error' ) {
snackBarRef.dismiss();
this.snackBar.open('There was an error with Sender blocking functionality. Please try again.', 'Dismiss');
} else {
this.snackBar.open(`${param} added to blocklist.`, 'Dismiss');
}
});
snackBarRef.dismiss();
}

allowListSender(param) {
Expand All @@ -217,9 +218,10 @@ export class RMM7MessageActions implements MessageActions {
if ( res.status === 'error' ) {
snackBarRef.dismiss();
this.snackBar.open('There was an error with Sender allowlisting functionality. Please try again.', 'Dismiss');
} else {
this.snackBar.open(`${param} added to allowlist.`, 'Dismiss');
}
});
snackBarRef.dismiss();
}

// Update mailviewer menu flag icon after flagging?
Expand Down
Loading