Skip to content

Commit

Permalink
fix(mailviewer): Shows confirmation after block/allow sender actions
Browse files Browse the repository at this point in the history
  • Loading branch information
castaway committed Feb 6, 2025
1 parent 7a26591 commit 088b3df
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit 088b3df

Please sign in to comment.