commit | e7a0a1fa71e3daa66fc9721fbb341b82bf514587 | [log] [tgz] |
---|---|---|
author | Oleg Zaim <106600432+OlegZaimNLT@users.noreply.github.com> | Fri Jul 08 18:47:51 2022 +0300 |
committer | GitHub <noreply@github.com> | Fri Jul 08 11:47:51 2022 -0400 |
tree | 821c97116470c86739a82a5c0dcbc97639aaa0cf | |
parent | af44afcb966c17074310bc9f15be2e9c284e942f [diff] |
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, );