Fix dismissing starred email (#732)

* Bump github/codeql-action from 2.1.12 to 2.1.14

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.12 to 2.1.14.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/27ea8f8fe5977c00f5b37e076ab846c5bd783b96...41a4ada31ba866a7f1196b9602703a89edd69e22)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixed dismissible exception on unstar email card.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
diff --git a/lib/studies/reply/mailbox_body.dart b/lib/studies/reply/mailbox_body.dart
index 0e07b89..05db609 100644
--- a/lib/studies/reply/mailbox_body.dart
+++ b/lib/studies/reply/mailbox_body.dart
@@ -90,7 +90,14 @@
                             email: email,
                             isStarred: model.isEmailStarred(email.id),
                             onDelete: () => model.deleteEmail(email.id),
-                            onStar: () => model.starEmail(email.id),
+                            onStar: () {
+                              int emailId = email.id;
+                              if (model.isEmailStarred(emailId)) {
+                                model.unstarEmail(emailId);
+                              } else {
+                                model.starEmail(emailId);
+                              }
+                            },
                             onStarredMailbox: model.selectedMailboxPage ==
                                 MailboxPageType.starred,
                           );