Skip to content

Commit

Permalink
Merge pull request #1662 from shadow-dot-cat/castaway/allow_block_sna…
Browse files Browse the repository at this point in the history
…ckbars

fix(mailviewer): Shows confirmation after block/allow sender actions
  • Loading branch information
castaway authored Feb 11, 2025
2 parents 7a26591 + 01377d3 commit 249b7c9
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 249b7c9

Please sign in to comment.